Skip to content

Commit f8937d4

Browse files
Merge pull request #2 from LukeIsCodingNet/dev
Changed the mod version in the main mod class, build.gradle, and mods…
2 parents d279d4f + cbbff3c commit f8937d4

File tree

67 files changed

+854
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+854
-84
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22
***
33

4+
## Version 0.0.2-alpha
5+
* Fixed the typo in the item namespace for Ruby Sword.
6+
* Fixed ores so that more of them spawn.
7+
* Fixed the block state for carbonado deepslate ore
8+
* Fixed crafting recipes for ruby sword, topaz how and shovel.
9+
* Changed the harvest level for ruby blocks and ores from diamond to iron.
10+
* Added ruby door, trapdoor, button, and pressure plate.
11+
* Added a portal frame block for a dimension in a future update.
12+
* Added a creative mode tab for redstone.
13+
* Added a creative mode tab for food.
14+
* Added a weed brownie.
15+
416
## Version 0.0.1-alpha
517
* The first alpha release of the mod.

build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ plugins {
1616
apply plugin: 'net.minecraftforge.gradle'
1717

1818

19-
version = '1.0'
20-
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
21-
archivesBaseName = 'modid'
19+
version = '0.0.2-alpha'
20+
group = 'net.lukeiscoding.opitemsmod_1182' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
21+
archivesBaseName = 'opitemsmod_1182'
2222

2323
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
2424
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
@@ -151,7 +151,7 @@ dependencies {
151151
// Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed
152152
// that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
153153
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
154-
minecraft 'net.minecraftforge:forge:1.18.2-40.1.0'
154+
minecraft 'net.minecraftforge:forge:1.18.2-40.1.84'
155155

156156
// Real mod deobf dependency examples - these get remapped to your current mappings
157157
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
@@ -170,12 +170,12 @@ dependencies {
170170
jar {
171171
manifest {
172172
attributes([
173-
"Specification-Title" : "examplemod",
174-
"Specification-Vendor" : "examplemodsareus",
173+
"Specification-Title" : "opitemsmod",
174+
"Specification-Vendor" : "lukeiscoding",
175175
"Specification-Version" : "1", // We are version 1 of ourselves
176176
"Implementation-Title" : project.name,
177177
"Implementation-Version" : project.jar.archiveVersion,
178-
"Implementation-Vendor" : "examplemodsareus",
178+
"Implementation-Vendor" : "lukeiscoding",
179179
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
180180
])
181181
}

src/main/java/net/lukeiscoding/minecraft/forge/opitemsmod/OpItemsMod.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
import net.lukeiscoding.minecraft.forge.opitemsmod.blocks.blockitems.RegisterBlockItems;
2020
import net.lukeiscoding.minecraft.forge.opitemsmod.registry.RegisterBlocks;
2121
import net.lukeiscoding.minecraft.forge.opitemsmod.registry.RegisterItems;
22+
import net.lukeiscoding.minecraft.forge.opitemsmod.world.dimension.ModDimensions;
23+
import net.minecraft.client.renderer.ItemBlockRenderTypes;
24+
import net.minecraft.client.renderer.RenderType;
2225
import net.minecraftforge.common.MinecraftForge;
2326
import net.minecraftforge.fml.common.Mod;
2427
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
@@ -34,7 +37,7 @@ public class OpItemsMod {
3437
public static final String MOD_ID = "opitemsmod_1182";
3538

3639
// create a string to reference the mod version
37-
public static final String MOD_VERSION = "0.1.0";
40+
public static final String MOD_VERSION = "0.0.2-alpha";
3841

3942
// get a logger
4043
public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
@@ -53,6 +56,9 @@ public OpItemsMod() {
5356
// call the registerBlockItems in the RegisterBlockItems class to register block items
5457
RegisterBlockItems.registerBlockItems();
5558

59+
// call the registerDimension method in the ModDimensions class to register dimensions
60+
ModDimensions.registerDimensions();
61+
5662
// register this mod to the forge event bus
5763
MinecraftForge.EVENT_BUS.register(this);
5864
}
@@ -64,5 +70,7 @@ private void setup(final FMLCommonSetupEvent event) {
6470
}
6571

6672
private void clientSetup(final FMLClientSetupEvent event) {
73+
ItemBlockRenderTypes.setRenderLayer(RegisterBlocks.RUBY_DOOR.get(), RenderType.translucent());
74+
ItemBlockRenderTypes.setRenderLayer(RegisterBlocks.RUBY_TRAPDOOR.get(), RenderType.translucent());
6775
}
6876
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package net.lukeiscoding.minecraft.forge.opitemsmod.blocks;
2+
/*
3+
Copyright (C) 2022 Luke Is Coding
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*/
18+
19+
import net.minecraft.world.level.block.DoorBlock;
20+
import net.minecraft.world.level.block.SoundType;
21+
import net.minecraft.world.level.block.state.BlockBehaviour;
22+
import net.minecraft.world.level.material.Material;
23+
24+
public class RubyDoor extends DoorBlock {
25+
26+
public RubyDoor() {
27+
super(BlockBehaviour.Properties.of(Material.METAL)
28+
.strength(8.5f, 9.5f)
29+
.sound(SoundType.METAL)
30+
.requiresCorrectToolForDrops()
31+
.noOcclusion());
32+
}
33+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package net.lukeiscoding.minecraft.forge.opitemsmod.blocks;
2+
/*
3+
Copyright (C) 2022 Luke Is Coding
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*/
18+
19+
import net.minecraft.world.level.block.SoundType;
20+
import net.minecraft.world.level.block.TrapDoorBlock;
21+
import net.minecraft.world.level.block.state.BlockBehaviour;
22+
import net.minecraft.world.level.material.Material;
23+
24+
public class RubyTrapdoor extends TrapDoorBlock {
25+
26+
public RubyTrapdoor() {
27+
super(BlockBehaviour.Properties.of(Material.STONE)
28+
.strength(7.5f, 8.5f)
29+
.sound(SoundType.METAL)
30+
.requiresCorrectToolForDrops()
31+
.noOcclusion());
32+
}
33+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package net.lukeiscoding.minecraft.forge.opitemsmod.blocks;
2+
/*
3+
Copyright (C) 2022 Luke Is Coding
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*/
18+
19+
import net.minecraft.world.level.block.Block;
20+
import net.minecraft.world.level.block.SoundType;
21+
import net.minecraft.world.level.block.state.BlockBehaviour;
22+
import net.minecraft.world.level.material.Material;
23+
24+
public class TikiPortalFrame extends Block {
25+
26+
public TikiPortalFrame() {
27+
super(BlockBehaviour.Properties.of(Material.PORTAL)
28+
.strength(10.0f, 12.0f)
29+
.sound(SoundType.STONE)
30+
.requiresCorrectToolForDrops());
31+
}
32+
}

src/main/java/net/lukeiscoding/minecraft/forge/opitemsmod/blocks/blockitems/RegisterBlockItems.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,24 @@ public static void registerBlockItems() {
9191
public static final RegistryObject<Item> CARBONADO_BLOCK_ITEM = BLOCK_ITEMS.register("carbonado_block", () ->
9292
new BlockItem(RegisterBlocks.CARBONADO_BLOCK.get(), new Item.Properties().tab(RegisterCreativeTabs.OP_BLOCKS_TAB))
9393
);
94+
95+
public static final RegistryObject<Item> TIKI_PORTAL_FRAME_ITEM = BLOCK_ITEMS.register("tiki_portal_frame", () ->
96+
new BlockItem(RegisterBlocks.TIKI_PORTAL_FRAME.get(), new Item.Properties().tab(RegisterCreativeTabs.OP_BLOCKS_TAB))
97+
);
98+
99+
public static final RegistryObject<Item> RUBY_BUTTON = BLOCK_ITEMS.register("ruby_button", () ->
100+
new BlockItem(RegisterBlocks.RUBY_BUTTON.get(), new Item.Properties().tab(RegisterCreativeTabs.OP_REDSTONE_TAB))
101+
);
102+
103+
public static final RegistryObject<Item> RUBY_PRESSURE_PLATE = BLOCK_ITEMS.register("ruby_pressure_plate", () ->
104+
new BlockItem(RegisterBlocks.RUBY_PRESSURE_PLATE.get(), new Item.Properties().tab(RegisterCreativeTabs.OP_REDSTONE_TAB))
105+
);
106+
107+
public static final RegistryObject<Item> RUBY_DOOR = BLOCK_ITEMS.register("ruby_door", () ->
108+
new BlockItem(RegisterBlocks.RUBY_DOOR.get(), new Item.Properties().tab(RegisterCreativeTabs.OP_REDSTONE_TAB))
109+
);
110+
111+
public static final RegistryObject<Item> RUBY_TRAPDOOR = BLOCK_ITEMS.register("ruby_trapdoor", () ->
112+
new BlockItem(RegisterBlocks.RUBY_TRAPDOOR.get(), new Item.Properties().tab(RegisterCreativeTabs.OP_REDSTONE_TAB))
113+
);
94114
}

src/main/java/net/lukeiscoding/minecraft/forge/opitemsmod/commands/CommandOpItemsMod.java

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
import net.minecraft.network.chat.TextComponent;
2727
import net.minecraft.world.entity.player.Player;
2828

29+
import java.util.ArrayList;
30+
import java.util.List;
31+
2932
public class CommandOpItemsMod {
3033

3134
public static void register(final CommandDispatcher<CommandSourceStack> dispatcher) {
@@ -36,16 +39,17 @@ private static int sendInfo(final CommandContext<CommandSourceStack> command) {
3639
if (command.getSource().getEntity() instanceof Player) {
3740
Player player = (Player) command.getSource().getEntity();
3841

39-
String[] messages = {
40-
"OpItemsMod for Minecraft 1.18.2",
41-
"Version: " + OpItemsMod.MOD_VERSION,
42-
"Mod ID: " + OpItemsMod.MOD_ID,
43-
"Made by: Luke Is Coding",
44-
"My website: https://lukeiscoding.net",
45-
"Donation link: https://ko-fi.com/lukeiscoding"
46-
};
47-
48-
player.sendMessage(new TextComponent(messages.toString()), Util.NIL_UUID);
42+
final List<String> messages = new ArrayList<>();
43+
messages.add("OpItemsMod for Minecraft 1.18.2");
44+
messages.add("Version: " + OpItemsMod.MOD_VERSION);
45+
messages.add("Mod ID: " + OpItemsMod.MOD_ID);
46+
messages.add("Made by: Luke Is Coding");
47+
messages.add("My website: https://lukeiscoding.net");
48+
messages.add("Donation link: https://ko-fi.com/lukeiscoding");
49+
50+
for (String s : messages) {
51+
player.sendMessage(new TextComponent(s), Util.NIL_UUID);
52+
}
4953
}
5054

5155
return Command.SINGLE_SUCCESS;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package net.lukeiscoding.minecraft.forge.opitemsmod.items.food;
2+
/*
3+
Copyright (C) 2022 Luke Is Coding
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*/
18+
19+
import net.minecraft.world.effect.MobEffectInstance;
20+
import net.minecraft.world.effect.MobEffects;
21+
import net.minecraft.world.food.FoodProperties;
22+
23+
public class ModFoodProperties {
24+
25+
26+
public static final FoodProperties WEED_BROWNIE = (new FoodProperties.Builder()).fast().nutrition(4).saturationMod(0.1f).effect(new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 1200), 12.5f).build();
27+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package net.lukeiscoding.minecraft.forge.opitemsmod.items.food;
2+
/*
3+
Copyright (C) 2022 Luke Is Coding
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*/
18+
19+
import net.lukeiscoding.minecraft.forge.opitemsmod.registry.RegisterCreativeTabs;
20+
import net.minecraft.world.item.Item;
21+
22+
public class WeedBrownie extends Item {
23+
24+
public WeedBrownie() {
25+
super(new Item.Properties().tab(RegisterCreativeTabs.OP_FOODS_TAB)
26+
.food(ModFoodProperties.WEED_BROWNIE));
27+
}
28+
}

0 commit comments

Comments
 (0)