diff --git a/build.gradle b/build.gradle index 4055b95e..61d7d581 100644 --- a/build.gradle +++ b/build.gradle @@ -21,13 +21,15 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(8) println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) minecraft { mappings channel: mappingsChannel, version: mappingsVersion - //makeObfSourceJar = false + // makeObfSourceJar = false accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') + runs { client { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' + mods { herobrine { source sourceSets.main @@ -38,7 +40,7 @@ minecraft { server { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' - property 'forge.logging.console.level', 'debug' + mods { herobrine { source sourceSets.main @@ -51,6 +53,7 @@ minecraft { property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' args '--mod', modId, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') + mods { herobrine { source sourceSets.main @@ -81,7 +84,7 @@ jar { } } -jar.finalizedBy('reobfJar') +jar.finalizedBy('reobfJar') //publish.dependsOn('reobfJar') publishing { @@ -95,4 +98,4 @@ publishing { url "file:///${project.projectDir}/mcmodsrepo" } } -} \ No newline at end of file +} diff --git a/gradle.properties b/gradle.properties index 224563c2..024df9dc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,9 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false -modVersion = 0.6.0 +modVersion = 0.6.1 modMinecraftVersion = 1.16.5 -modForgeVersion = 36.1.4 +modForgeVersion = 36.1.6 mappingsChannel = snapshot mappingsVersion = 20201028-1.16.3 modId = herobrine diff --git a/src/main/java/com/herobrine/mod/HerobrineMod.java b/src/main/java/com/herobrine/mod/HerobrineMod.java index 9bafa110..07a32421 100644 --- a/src/main/java/com/herobrine/mod/HerobrineMod.java +++ b/src/main/java/com/herobrine/mod/HerobrineMod.java @@ -7,6 +7,7 @@ import com.herobrine.mod.items.HolyWaterItem; import com.herobrine.mod.items.UnholyWaterItem; import com.herobrine.mod.savedata.HerobrineSaveData; +import com.herobrine.mod.util.blocks.BlockList; import com.herobrine.mod.util.entities.DefaultSurvivorSkins; import com.herobrine.mod.util.entities.EntityRegistry; import com.herobrine.mod.util.items.ArmorMaterialList; @@ -64,81 +65,78 @@ private void init(FMLCommonSetupEvent event) { DefaultSurvivorSkins.registerDefaultSkins(); } - @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) - public static class RegistryEvents { - @SubscribeEvent - public static void registerItems(@NotNull final RegistryEvent.Register event) { - assert false; - event.getRegistry().registerAll( - new BlockItem(HerobrineAltar.block, new Item.Properties().group(ItemGroup.DECORATIONS)).setRegistryName(location("herobrine_altar")), - new BlockItem(CursedDiamondBlock.block, new Item.Properties().group(ItemGroup.DECORATIONS)).setRegistryName(location("cursed_diamond_block")), - new HerobrineStatueItem(HerobrineStatue.block, new Item.Properties().group(ItemGroup.DECORATIONS)).setRegistryName(location("herobrine_statue")), - new BlockItem(PurifiedDiamondBlock.block, new Item.Properties().group(ItemGroup.DECORATIONS)).setRegistryName(location("purified_diamond_block")), - ItemList.bedrock_sword = new SwordItem(ItemTierList.bedrock_item_tier, 0, -2.4f, new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName(location("bedrock_sword")), - ItemList.cursed_diamond = new Item(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("cursed_diamond")), - ItemList.cursed_diamond_sword = new SwordItem(ItemTierList.cursed_diamond_item_tier, 3, -2.4f, new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName(location("cursed_diamond_sword")), - ItemList.cursed_diamond_axe = new AxeItem(ItemTierList.cursed_diamond_item_tier, 5, -3.0f, new Item.Properties().group(ItemGroup.TOOLS)).setRegistryName(location("cursed_diamond_axe")), - ItemList.cursed_diamond_pickaxe = new PickaxeItem(ItemTierList.cursed_diamond_item_tier, 1, -2.8f, new Item.Properties().group(ItemGroup.TOOLS)).setRegistryName(location("cursed_diamond_pickaxe")), - ItemList.cursed_diamond_shovel = new ShovelItem(ItemTierList.cursed_diamond_item_tier, 1.5f, -3.0f, new Item.Properties().group(ItemGroup.TOOLS)).setRegistryName(location("cursed_diamond_shovel")), - ItemList.cursed_diamond_hoe = new HoeItem(ItemTierList.cursed_diamond_item_tier, -4,0.0f, new Item.Properties().group(ItemGroup.TOOLS)).setRegistryName(location("cursed_diamond_hoe")), - ItemList.cursed_diamond_helmet = new ArmorItem(ArmorMaterialList.cursed_diamond_armor_material, EquipmentSlotType.HEAD, new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName(location("cursed_diamond_helmet")), - ItemList.cursed_diamond_chestplate = new ArmorItem(ArmorMaterialList.cursed_diamond_armor_material, EquipmentSlotType.CHEST, new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName(location("cursed_diamond_chestplate")), - ItemList.cursed_diamond_leggings = new ArmorItem(ArmorMaterialList.cursed_diamond_armor_material, EquipmentSlotType.LEGS, new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName(location("cursed_diamond_leggings")), - ItemList.cursed_diamond_boots = new ArmorItem(ArmorMaterialList.cursed_diamond_armor_material, EquipmentSlotType.FEET, new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName(location("cursed_diamond_boots")), - ItemList.cursed_dust = new Item(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("cursed_dust")), - ItemList.holy_water = new HolyWaterItem(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("holy_water")), - ItemList.unholy_water = new UnholyWaterItem(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("unholy_water")), - ItemList.purified_diamond = new Item(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("purified_diamond")), - ItemList.music_disc_dog = new MusicDiscItem(14, () -> new SoundEvent(HerobrineMod.location("music_disc_dog")), new Item.Properties().maxStackSize(1).group(ItemGroup.MISC).rarity(Rarity.RARE)).setRegistryName(location("music_disc_dog")) - ); - EntityRegistry.registerEntitySpawnEggs(event); - } + @SubscribeEvent + public static void registerItems(@NotNull final RegistryEvent.Register event) { + assert false; + event.getRegistry().registerAll( + ItemList.herobrine_altar = new BlockItem(BlockList.herobrine_altar, new Item.Properties().group(ItemGroup.DECORATIONS)).setRegistryName(location("herobrine_altar")), + ItemList.cursed_diamond_block = new BlockItem(BlockList.cursed_diamond_block, new Item.Properties().group(ItemGroup.DECORATIONS)).setRegistryName(location("cursed_diamond_block")), + ItemList.herobrine_statue = new HerobrineStatueItem(BlockList.herobrine_statue, new Item.Properties().group(ItemGroup.DECORATIONS)).setRegistryName(location("herobrine_statue")), + ItemList.purified_diamond_block = new BlockItem(BlockList.herobrine_statue_top, new Item.Properties().group(ItemGroup.DECORATIONS)).setRegistryName(location("purified_diamond_block")), + ItemList.bedrock_sword = new SwordItem(ItemTierList.bedrock_item_tier, 0, -2.4f, new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName(location("bedrock_sword")), + ItemList.cursed_diamond = new Item(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("cursed_diamond")), + ItemList.cursed_diamond_sword = new SwordItem(ItemTierList.cursed_diamond_item_tier, 3, -2.4f, new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName(location("cursed_diamond_sword")), + ItemList.cursed_diamond_axe = new AxeItem(ItemTierList.cursed_diamond_item_tier, 5, -3.0f, new Item.Properties().group(ItemGroup.TOOLS)).setRegistryName(location("cursed_diamond_axe")), + ItemList.cursed_diamond_pickaxe = new PickaxeItem(ItemTierList.cursed_diamond_item_tier, 1, -2.8f, new Item.Properties().group(ItemGroup.TOOLS)).setRegistryName(location("cursed_diamond_pickaxe")), + ItemList.cursed_diamond_shovel = new ShovelItem(ItemTierList.cursed_diamond_item_tier, 1.5f, -3.0f, new Item.Properties().group(ItemGroup.TOOLS)).setRegistryName(location("cursed_diamond_shovel")), + ItemList.cursed_diamond_hoe = new HoeItem(ItemTierList.cursed_diamond_item_tier, -4,0.0f, new Item.Properties().group(ItemGroup.TOOLS)).setRegistryName(location("cursed_diamond_hoe")), + ItemList.cursed_diamond_helmet = new ArmorItem(ArmorMaterialList.cursed_diamond_armor_material, EquipmentSlotType.HEAD, new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName(location("cursed_diamond_helmet")), + ItemList.cursed_diamond_chestplate = new ArmorItem(ArmorMaterialList.cursed_diamond_armor_material, EquipmentSlotType.CHEST, new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName(location("cursed_diamond_chestplate")), + ItemList.cursed_diamond_leggings = new ArmorItem(ArmorMaterialList.cursed_diamond_armor_material, EquipmentSlotType.LEGS, new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName(location("cursed_diamond_leggings")), + ItemList.cursed_diamond_boots = new ArmorItem(ArmorMaterialList.cursed_diamond_armor_material, EquipmentSlotType.FEET, new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName(location("cursed_diamond_boots")), + ItemList.cursed_dust = new Item(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("cursed_dust")), + ItemList.holy_water = new HolyWaterItem(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("holy_water")), + ItemList.unholy_water = new UnholyWaterItem(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("unholy_water")), + ItemList.purified_diamond = new Item(new Item.Properties().group(ItemGroup.MISC)).setRegistryName(location("purified_diamond")), + ItemList.music_disc_dog = new MusicDiscItem(14, () -> new SoundEvent(HerobrineMod.location("music_disc_dog")), new Item.Properties().maxStackSize(1).group(ItemGroup.MISC).rarity(Rarity.RARE)).setRegistryName(location("music_disc_dog")) + ); + EntityRegistry.registerEntitySpawnEggs(event); + } - @SubscribeEvent - public static void registerBlocks(@NotNull final RegistryEvent.Register event) { - event.getRegistry().registerAll( - new HerobrineAltar(), - new CursedDiamondBlock(), - new HerobrineStatue(), - new HerobrineStatueTop(), - new PurifiedDiamondBlock() - ); - } + @SubscribeEvent + public static void registerBlocks(@NotNull final RegistryEvent.Register event) { + event.getRegistry().registerAll( + BlockList.herobrine_altar = new HerobrineAltar().setRegistryName(location("herobrine_altar")), + BlockList.cursed_diamond_block = new CursedDiamondBlock().setRegistryName(location("cursed_diamond_block")), + BlockList.herobrine_statue = new HerobrineStatue().setRegistryName(location("herobrine_statue")), + BlockList.herobrine_statue_top = new HerobrineStatueTop().setRegistryName(location("herobrine_statue_top")), + BlockList.purified_diamond_block = new PurifiedDiamondBlock().setRegistryName(location("purified_diamond_block")) + ); + } - @SubscribeEvent - public static void registerEntities(@NotNull final RegistryEvent.Register> event) { - event.getRegistry().registerAll( - EntityRegistry.HEROBRINE_WARRIOR_ENTITY, - EntityRegistry.INFECTED_PIG_ENTITY, - EntityRegistry.INFECTED_CHICKEN_ENTITY, - EntityRegistry.INFECTED_SHEEP_ENTITY, - EntityRegistry.INFECTED_COW_ENTITY, - EntityRegistry.INFECTED_MOOSHROOM_ENTITY, - EntityRegistry.INFECTED_VILLAGER_ENTITY, - EntityRegistry.HEROBRINE_SPY_ENTITY, - EntityRegistry.HEROBRINE_BUILDER_ENTITY, - EntityRegistry.HEROBRINE_MAGE_ENTITY, - EntityRegistry.FAKE_HEROBRINE_MAGE_ENTITY, - EntityRegistry.HOLY_WATER_ENTITY, - EntityRegistry.UNHOLY_WATER_ENTITY, - EntityRegistry.STEVE_SURVIVOR_ENTITY, - EntityRegistry.ALEX_SURVIVOR_ENTITY, - EntityRegistry.INFECTED_WOLF_ENTITY, - EntityRegistry.INFECTED_LLAMA_ENTITY, - EntityRegistry.INFECTED_HORSE_ENTITY, - EntityRegistry.INFECTED_DONKEY_ENTITY, - EntityRegistry.INFECTED_RABBIT_ENTITY, - EntityRegistry.INFECTED_BAT_ENTITY, - EntityRegistry.HEROBRINE_STALKER_ENTITY - ); - EntityRegistry.registerSpawnPlacement(); - EntityRegistry.registerEntityAttributes(); - } + @SubscribeEvent + public static void registerEntities(@NotNull final RegistryEvent.Register> event) { + event.getRegistry().registerAll( + EntityRegistry.HEROBRINE_WARRIOR_ENTITY, + EntityRegistry.INFECTED_PIG_ENTITY, + EntityRegistry.INFECTED_CHICKEN_ENTITY, + EntityRegistry.INFECTED_SHEEP_ENTITY, + EntityRegistry.INFECTED_COW_ENTITY, + EntityRegistry.INFECTED_MOOSHROOM_ENTITY, + EntityRegistry.INFECTED_VILLAGER_ENTITY, + EntityRegistry.HEROBRINE_SPY_ENTITY, + EntityRegistry.HEROBRINE_BUILDER_ENTITY, + EntityRegistry.HEROBRINE_MAGE_ENTITY, + EntityRegistry.FAKE_HEROBRINE_MAGE_ENTITY, + EntityRegistry.HOLY_WATER_ENTITY, + EntityRegistry.UNHOLY_WATER_ENTITY, + EntityRegistry.STEVE_SURVIVOR_ENTITY, + EntityRegistry.ALEX_SURVIVOR_ENTITY, + EntityRegistry.INFECTED_WOLF_ENTITY, + EntityRegistry.INFECTED_LLAMA_ENTITY, + EntityRegistry.INFECTED_HORSE_ENTITY, + EntityRegistry.INFECTED_DONKEY_ENTITY, + EntityRegistry.INFECTED_RABBIT_ENTITY, + EntityRegistry.INFECTED_BAT_ENTITY, + EntityRegistry.HEROBRINE_STALKER_ENTITY + ); + EntityRegistry.registerSpawnPlacement(); + EntityRegistry.registerEntityAttributes(); + } - @SubscribeEvent - public static void registerBiomes(@NotNull final RegistryEvent.Register event) { - BiomeInit.registerBiomes(); - } + @SubscribeEvent + public static void registerBiomes(@NotNull final RegistryEvent.Register event) { + BiomeInit.registerBiomes(); } public void onWorldLoaded(WorldEvent.Load event) { diff --git a/src/main/java/com/herobrine/mod/blocks/CursedDiamondBlock.java b/src/main/java/com/herobrine/mod/blocks/CursedDiamondBlock.java index 59c546a2..43de7d20 100644 --- a/src/main/java/com/herobrine/mod/blocks/CursedDiamondBlock.java +++ b/src/main/java/com/herobrine/mod/blocks/CursedDiamondBlock.java @@ -1,6 +1,5 @@ package com.herobrine.mod.blocks; -import com.herobrine.mod.HerobrineMod; import com.herobrine.mod.util.blocks.BlockMaterialList; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -12,18 +11,13 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.ToolType; -import net.minecraftforge.registries.ObjectHolder; import org.jetbrains.annotations.NotNull; import java.util.Random; public class CursedDiamondBlock extends Block { - @ObjectHolder(HerobrineMod.MODID + ":cursed_diamond_block") - public static final Block block = null; - public CursedDiamondBlock() { super(Properties.create(BlockMaterialList.CURSED_DIAMOND_BLOCK_MATERIAL).hardnessAndResistance(1.5F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1)); - setRegistryName("cursed_diamond_block"); } @OnlyIn(Dist.CLIENT) diff --git a/src/main/java/com/herobrine/mod/blocks/HerobrineAltar.java b/src/main/java/com/herobrine/mod/blocks/HerobrineAltar.java index 7bad5473..df3d6c9e 100644 --- a/src/main/java/com/herobrine/mod/blocks/HerobrineAltar.java +++ b/src/main/java/com/herobrine/mod/blocks/HerobrineAltar.java @@ -1,6 +1,5 @@ package com.herobrine.mod.blocks; -import com.herobrine.mod.HerobrineMod; import com.herobrine.mod.config.Config; import com.herobrine.mod.util.blocks.BlockMaterialList; import com.herobrine.mod.util.blocks.ModBlockStates; @@ -37,20 +36,19 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.ToolType; -import net.minecraftforge.registries.ObjectHolder; import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; import java.util.Random; import java.util.UUID; -import static com.herobrine.mod.HerobrineMod.location; - public class HerobrineAltar extends Block implements IWaterLoggable { - @ObjectHolder(HerobrineMod.MODID + ":herobrine_altar") - public static final Block block = null; public static final VoxelShape SHAPE = VoxelShapes.or(Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D), Block.makeCuboidShape(0.0D, 9.0D, 0.0D, 1.0D, 15.0D, 1.0D), Block.makeCuboidShape(16.0D, 9.0D, 0.0D, 15.0D, 15.0D, 1.0D), Block.makeCuboidShape(16.0D, 9.0D, 16.0D, 15.0D, 15.0D, 15.0D), Block.makeCuboidShape(0.0D, 9.0D, 16.0D, 1.0D, 15.0D, 15.0D), Block.makeCuboidShape(0.0D, 15.0D, 0.0D, 2.0D, 16.0D, 2.0D), Block.makeCuboidShape(14.0D, 15.0D, 0.0D, 16.0D, 16.0D, 2.0D), Block.makeCuboidShape(14.0D, 15.0D, 14.0D, 16.0D, 16.0D, 16.0D), Block.makeCuboidShape(0.0D, 15.0D, 14.0D, 2.0D, 16.0D, 16.0D), Block.makeCuboidShape(0.0D, 8.0D, 0.0D, 2.0D, 9.0D, 2.0D), Block.makeCuboidShape(14.0D, 8.0D, 0.0D, 16.0D, 9.0D, 2.0D), Block.makeCuboidShape(14.0D, 8.0D, 14.0D, 16.0D, 9.0D, 16.0D), Block.makeCuboidShape(0.0D, 8.0D, 14.0D, 2.0D, 9.0D, 16.0D)); public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; + public HerobrineAltar() { + super(Properties.create(BlockMaterialList.HEROBRINE_ALTER_MATERIAL).hardnessAndResistance(1.5F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(0).notSolid().variableOpacity().setLightLevel(HerobrineAltar::getLightValue).setAllowsSpawn(HerobrineAltar::neverAllowSpawn)); + this.setDefaultState(this.getDefaultState().with(BlockStateProperties.WATERLOGGED, Boolean.FALSE).with(ModBlockStates.TYPE, 0)); + } private static int getLightValue(BlockState state) { int i = state.get(ModBlockStates.TYPE); @@ -67,12 +65,6 @@ private static Boolean neverAllowSpawn(BlockState state, IBlockReader reader, Bl return false; } - public HerobrineAltar() { - super(Properties.create(BlockMaterialList.HEROBRINE_ALTER_MATERIAL).hardnessAndResistance(1.5F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(0).notSolid().variableOpacity().setLightLevel(HerobrineAltar::getLightValue).setAllowsSpawn(HerobrineAltar::neverAllowSpawn)); - this.setDefaultState(this.getDefaultState().with(BlockStateProperties.WATERLOGGED, Boolean.FALSE).with(ModBlockStates.TYPE, 0)); - setRegistryName(location("herobrine_altar")); - } - @NotNull @Override public VoxelShape getShape(@NotNull BlockState state, @NotNull IBlockReader worldIn, @NotNull BlockPos pos, @NotNull ISelectionContext context) { diff --git a/src/main/java/com/herobrine/mod/blocks/HerobrineStatue.java b/src/main/java/com/herobrine/mod/blocks/HerobrineStatue.java index 02137523..1f0790cb 100644 --- a/src/main/java/com/herobrine/mod/blocks/HerobrineStatue.java +++ b/src/main/java/com/herobrine/mod/blocks/HerobrineStatue.java @@ -1,6 +1,6 @@ package com.herobrine.mod.blocks; -import com.herobrine.mod.HerobrineMod; +import com.herobrine.mod.util.blocks.BlockList; import com.herobrine.mod.util.blocks.BlockMaterialList; import net.minecraft.block.*; import net.minecraft.block.material.PushReaction; @@ -27,12 +27,9 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.ToolType; -import net.minecraftforge.registries.ObjectHolder; import org.jetbrains.annotations.NotNull; public class HerobrineStatue extends HorizontalBlock implements IWaterLoggable{ - @ObjectHolder(HerobrineMod.MODID + ":herobrine_statue") - public static final Block block = null; public static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING; public static final VoxelShape North_South = VoxelShapes.or(Block.makeCuboidShape(4, 0, 6, 12, 12, 10), Block.makeCuboidShape(0, 12, 6, 16, 16, 10)); public static final VoxelShape East_West = VoxelShapes.or(Block.makeCuboidShape(6, 0, 4, 10, 12, 12), Block.makeCuboidShape(6, 12, 0, 10, 16, 16)); @@ -46,7 +43,6 @@ private static boolean isntSolid(BlockState state, IBlockReader reader, BlockPos public HerobrineStatue() { super(Properties.create(BlockMaterialList.HEROBRINE_STATUE_MATERIAL).hardnessAndResistance(1.5F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(0).notSolid().variableOpacity().setAllowsSpawn(HerobrineStatue::neverAllowSpawn).setSuffocates(HerobrineStatue::isntSolid)); - setRegistryName(HerobrineMod.location("herobrine_statue")); this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH).with(BlockStateProperties.WATERLOGGED, Boolean.FALSE)); } @@ -93,7 +89,7 @@ public void onBlockAdded(@NotNull BlockState state, @NotNull World world, @NotNu int z = pos.getZ(); FluidState FluidState = world.getFluidState(new BlockPos(x, y + 1, z)); assert false; - world.setBlockState(new BlockPos(x, y + 1, z), HerobrineStatueTop.block.getDefaultState().with(FACING, state.get(FACING)).with(BlockStateProperties.WATERLOGGED, FluidState.getFluid() == Fluids.WATER)); + world.setBlockState(new BlockPos(x, y + 1, z), BlockList.herobrine_statue_top.getDefaultState().with(FACING, state.get(FACING)).with(BlockStateProperties.WATERLOGGED, FluidState.getFluid() == Fluids.WATER)); } @Override diff --git a/src/main/java/com/herobrine/mod/blocks/HerobrineStatueTop.java b/src/main/java/com/herobrine/mod/blocks/HerobrineStatueTop.java index 57b3951b..26bf1eca 100644 --- a/src/main/java/com/herobrine/mod/blocks/HerobrineStatueTop.java +++ b/src/main/java/com/herobrine/mod/blocks/HerobrineStatueTop.java @@ -1,6 +1,5 @@ package com.herobrine.mod.blocks; -import com.herobrine.mod.HerobrineMod; import com.herobrine.mod.util.blocks.BlockMaterialList; import net.minecraft.block.*; import net.minecraft.block.material.PushReaction; @@ -27,12 +26,9 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.ToolType; -import net.minecraftforge.registries.ObjectHolder; import org.jetbrains.annotations.NotNull; public class HerobrineStatueTop extends HorizontalBlock implements IWaterLoggable { - @ObjectHolder(HerobrineMod.MODID + ":herobrine_statue_top") - public static final Block block = null; public static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING; public static final VoxelShape North_South = VoxelShapes.or(Block.makeCuboidShape(0, 0, 6, 16, 8, 10), Block.makeCuboidShape(4, 8, 4, 12, 16, 12)); public static final VoxelShape East_West = VoxelShapes.or(Block.makeCuboidShape(6, 0, 0, 10, 8, 16), Block.makeCuboidShape(4, 8, 4, 12, 16, 12)); @@ -46,7 +42,6 @@ private static boolean isntSolid(BlockState state, IBlockReader reader, BlockPos public HerobrineStatueTop() { super(Properties.create(BlockMaterialList.HEROBRINE_STATUE_MATERIAL).hardnessAndResistance(1.5F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(0).notSolid().variableOpacity().setAllowsSpawn(HerobrineStatueTop::neverAllowSpawn).setSuffocates(HerobrineStatueTop::isntSolid)); - setRegistryName(HerobrineMod.location("herobrine_statue_top")); this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH).with(BlockStateProperties.WATERLOGGED, Boolean.FALSE)); } diff --git a/src/main/java/com/herobrine/mod/blocks/PurifiedDiamondBlock.java b/src/main/java/com/herobrine/mod/blocks/PurifiedDiamondBlock.java index 5aebac90..af0a839a 100644 --- a/src/main/java/com/herobrine/mod/blocks/PurifiedDiamondBlock.java +++ b/src/main/java/com/herobrine/mod/blocks/PurifiedDiamondBlock.java @@ -1,18 +1,12 @@ package com.herobrine.mod.blocks; -import com.herobrine.mod.HerobrineMod; import com.herobrine.mod.util.blocks.BlockMaterialList; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraftforge.common.ToolType; -import net.minecraftforge.registries.ObjectHolder; public class PurifiedDiamondBlock extends Block { - @ObjectHolder(HerobrineMod.MODID + ":purified_diamond_block") - public static final Block block = null; - public PurifiedDiamondBlock() { super(Properties.create(BlockMaterialList.PURIFIED_DIAMOND_BLOCK_MATERIAL).hardnessAndResistance(1.5F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1)); - setRegistryName("purified_diamond_block"); } } diff --git a/src/main/java/com/herobrine/mod/util/blocks/BlockList.java b/src/main/java/com/herobrine/mod/util/blocks/BlockList.java new file mode 100644 index 00000000..40e08fb4 --- /dev/null +++ b/src/main/java/com/herobrine/mod/util/blocks/BlockList.java @@ -0,0 +1,11 @@ +package com.herobrine.mod.util.blocks; + +import net.minecraft.block.Block; + +public class BlockList { + public static Block herobrine_altar; + public static Block cursed_diamond_block; + public static Block purified_diamond_block; + public static Block herobrine_statue; + public static Block herobrine_statue_top; +} diff --git a/src/main/java/com/herobrine/mod/util/items/ItemList.java b/src/main/java/com/herobrine/mod/util/items/ItemList.java index a8517cc5..def1e77d 100644 --- a/src/main/java/com/herobrine/mod/util/items/ItemList.java +++ b/src/main/java/com/herobrine/mod/util/items/ItemList.java @@ -38,4 +38,8 @@ public class ItemList { public static Item steve_survivor_spawn_egg; public static Item herobrine_stalker_spawn_egg; public static Item music_disc_dog; + public static Item herobrine_altar; + public static Item cursed_diamond_block; + public static Item herobrine_statue; + public static Item purified_diamond_block; } \ No newline at end of file diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index def2362a..998b2e27 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -4,7 +4,7 @@ license="GNU General Public License version 3 (GPLv3)" issueTrackerURL="https://github.com/Alex-MacLean/TheLegendOfHerobrine/issues" #optional [[mods]] #mandatory modId="herobrine" #mandatory -version="0.6.0" #mandatory +version="0.6.1" #mandatory displayName="The Legend of Herobrine" #mandatory updateJSONURL="https://raw.githubusercontent.com/Alex-MacLean/TheLegendOfHerobrine/master/update.json" #optional displayURL="https://www.herobrinemod.com" #optional diff --git a/update.json b/update.json index 85d2cc93..35133429 100644 --- a/update.json +++ b/update.json @@ -1,10 +1,12 @@ { "homepage": "https://www.herobrinemod.com/downloads", "1.16.5": { - "0.6.0": "*Herobrine and Infected Mobs have glowing eyes\n\n+Added Herobrine stalker that wanders around the world then charges the player and gives them blindness and nausea.\n\n+Adds music disc \"C418 - dog\" which is present in the Minecraft Volume Alpha album but was never added to the game.\n\n*Made scaling of entities more consistent with vanilla Minecraft.\n\n+Added the ability to register custom survivor skins through an early addon system.\n\n*Entity spawn placement is registered at the same time entities are.\n\n*Herobrine Builder now places signs 10% of the time it would place a structure.\n\n*Fixed despawn and spellcast effects for Herobrine.\n\n+Added crafting recipe for Purified Diamond.\n\n*Fixed language provider error on Forge 36.1.0+.\n\n*Trapped houses and Herobrine States only generate after an Altar has been activated.\n\n+Added Sand Pyramids in Ocean biomes that spawns after an Altar has been activated.\n\n+Added glowstone pillars that generate after an Altar has been activated.\n\n*Rewrote world save data again. Fixes issues with multiplayer, client/server desync issues, and a bug where savedata would carry over to other worlds and cause many issues. Please note that world save data will be reset upon upgrading your world.\n\n*Fixed a typo in the registry name and translation key of Altar of Herobrine. Please note that existing altars will be removed from the world when upgrading.\n\n*Fixed Infected Donkey uses incorrect ears model.\n\n+Added Config option controlling how Herobrine spawns in the end dimension.\n\n*Rebalanced default spawn weights. It is recommended you reset your config to get the latest values.\n\n*Herobrine Altar now drops the diamond it is holding if activated or purified.\n\n*Fixed a bug where mobs would try to target survivors through walls.\n\n*Cleaned up assets directory.\n\n*Holy Water and Cursed Dust now use shapeless crafting recipes and cursed dust yields 4 dust.\n\n*The Herobrine builder only builds Ominous Mineshafts 10% of the time to prevent cave systems from being ruined." + "0.6.0": "*Herobrine and Infected Mobs have glowing eyes\n\n+Added Herobrine stalker that wanders around the world then charges the player and gives them blindness and nausea.\n\n+Adds music disc \"C418 - dog\" which is present in the Minecraft Volume Alpha album but was never added to the game.\n\n*Made scaling of entities more consistent with vanilla Minecraft.\n\n+Added the ability to register custom survivor skins through an early addon system.\n\n*Entity spawn placement is registered at the same time entities are.\n\n*Herobrine Builder now places signs 10% of the time it would place a structure.\n\n*Fixed despawn and spellcast effects for Herobrine.\n\n+Added crafting recipe for Purified Diamond.\n\n*Fixed language provider error on Forge 36.1.0+.\n\n*Trapped houses and Herobrine States only generate after an Altar has been activated.\n\n+Added Sand Pyramids in Ocean biomes that spawns after an Altar has been activated.\n\n+Added glowstone pillars that generate after an Altar has been activated.\n\n*Rewrote world save data again. Fixes issues with multiplayer, client/server desync issues, and a bug where savedata would carry over to other worlds and cause many issues. Please note that world save data will be reset upon upgrading your world.\n\n*Fixed a typo in the registry name and translation key of Altar of Herobrine. Please note that existing altars will be removed from the world when upgrading.\n\n*Fixed Infected Donkey uses incorrect ears model.\n\n+Added Config option controlling how Herobrine spawns in the end dimension.\n\n*Rebalanced default spawn weights. It is recommended you reset your config to get the latest values.\n\n*Herobrine Altar now drops the diamond it is holding if activated or purified.\n\n*Fixed a bug where mobs would try to target survivors through walls.\n\n*Cleaned up assets directory.\n\n*Holy Water and Cursed Dust now use shapeless crafting recipes and cursed dust yields 4 dust.\n\n*The Herobrine builder only builds Ominous Mineshafts 10% of the time to prevent cave systems from being ruined.", + "0.6.1": "*Fixed Herobrine Mage teleporting a target that is riding an entity causes issues with the game thinking the target is still riding the entity while the target can freely move around.\n\n*Improved how registry events are handled.\n\n*Improved how blocks and block items are registered." }, "1.16.4": { - "0.6.0": "*Herobrine and Infected Mobs have glowing eyes\n\n+Added Herobrine stalker that wanders around the world then charges the player and gives them blindness and nausea.\n\n+Adds music disc \"C418 - dog\" which is present in the Minecraft Volume Alpha album but was never added to the game.\n\n*Made scaling of entities more consistent with vanilla Minecraft.\n\n+Added the ability to register custom survivor skins through an early addon system.\n\n*Entity spawn placement is registered at the same time entities are.\n\n*Herobrine Builder now places signs 10% of the time it would place a structure.\n\n*Fixed despawn and spellcast effects for Herobrine.\n\n+Added crafting recipe for Purified Diamond.\n\n*Fixed language provider error on Forge 36.1.0+.\n\n*Trapped houses and Herobrine States only generate after an Altar has been activated.\n\n+Added Sand Pyramids in Ocean biomes that spawns after an Altar has been activated.\n\n+Added glowstone pillars that generate after an Altar has been activated.\n\n*Rewrote world save data again. Fixes issues with multiplayer, client/server desync issues, and a bug where savedata would carry over to other worlds and cause many issues. Please note that world save data will be reset upon upgrading your world.\n\n*Fixed a typo in the registry name and translation key of Altar of Herobrine. Please note that existing altars will be removed from the world when upgrading.\n\n*Fixed Infected Donkey uses incorrect ears model.\n\n+Added Config option controlling how Herobrine spawns in the end dimension.\n\n*Rebalanced default spawn weights. It is recommended you reset your config to get the latest values.\n\n*Herobrine Altar now drops the diamond it is holding if activated or purified.\n\n*Fixed a bug where mobs would try to target survivors through walls.\n\n*Cleaned up assets directory.\n\n*Holy Water and Cursed Dust now use shapeless crafting recipes and cursed dust yields 4 dust.\n\n*The Herobrine builder only builds Ominous Mineshafts 10% of the time to prevent cave systems from being ruined." + "0.6.0": "*Herobrine and Infected Mobs have glowing eyes\n\n+Added Herobrine stalker that wanders around the world then charges the player and gives them blindness and nausea.\n\n+Adds music disc \"C418 - dog\" which is present in the Minecraft Volume Alpha album but was never added to the game.\n\n*Made scaling of entities more consistent with vanilla Minecraft.\n\n+Added the ability to register custom survivor skins through an early addon system.\n\n*Entity spawn placement is registered at the same time entities are.\n\n*Herobrine Builder now places signs 10% of the time it would place a structure.\n\n*Fixed despawn and spellcast effects for Herobrine.\n\n+Added crafting recipe for Purified Diamond.\n\n*Fixed language provider error on Forge 36.1.0+.\n\n*Trapped houses and Herobrine States only generate after an Altar has been activated.\n\n+Added Sand Pyramids in Ocean biomes that spawns after an Altar has been activated.\n\n+Added glowstone pillars that generate after an Altar has been activated.\n\n*Rewrote world save data again. Fixes issues with multiplayer, client/server desync issues, and a bug where savedata would carry over to other worlds and cause many issues. Please note that world save data will be reset upon upgrading your world.\n\n*Fixed a typo in the registry name and translation key of Altar of Herobrine. Please note that existing altars will be removed from the world when upgrading.\n\n*Fixed Infected Donkey uses incorrect ears model.\n\n+Added Config option controlling how Herobrine spawns in the end dimension.\n\n*Rebalanced default spawn weights. It is recommended you reset your config to get the latest values.\n\n*Herobrine Altar now drops the diamond it is holding if activated or purified.\n\n*Fixed a bug where mobs would try to target survivors through walls.\n\n*Cleaned up assets directory.\n\n*Holy Water and Cursed Dust now use shapeless crafting recipes and cursed dust yields 4 dust.\n\n*The Herobrine builder only builds Ominous Mineshafts 10% of the time to prevent cave systems from being ruined.", + "0.6.1": "*Fixed Herobrine Mage teleporting a target that is riding an entity causes issues with the game thinking the target is still riding the entity while the target can freely move around.\n\n*Improved how registry events are handled.\n\n*Improved how blocks and block items are registered." }, "1.15.2": { "0.5.0": "Please note that due to a re-write of world data and the Altar of Herobrine you may need to re-summon Herobrine in existing worlds, and the Altar of Herobrine will be reset to the inactive state!\n+Herobrine can now be un-summoned by activating an Altar of Herobrine with a Purified Diamond!\n+The Altar of Herobrine now needs to be built on a shrine to summon and un-summon Herobrine (See Description). This can be disabled in Config.\n+Added Cursed Block of Diamond.\n+Added Statue of Herobrine.\n+Added Purified Block of Diamond.\n+Added Purified Diamond.\n+Added Config.\n+All Infected mobs can be cured by throwing Holy Water on them.\n+Added Survivor, which trades items useful in summoning and defeating Herobrine. They spawn in Survivor Bases, and in Steve and Alex variants.\n+Added Infected Bats, Donkeys, Horses, Llamas, Rabbits, and Wolves.\n*Most Entities (except for infected llamas due to limitations) now are instances of Abstract classes, this allows for optimization, and makes developing addons for this mod easier.\n*Fixed spawning of mobs, Infected mobs no longer spawn underground, and the nether and end are actually playable with this mod now.\n*The powerful Herobrine mobs have been balanced to be more fair.\n*Fixed dimensions not syncing custom world data properly with this mod.\n*Fixed bugs on LAN worlds and servers.\n*Spawning of almost everything added has been re-balanced, Structures and biomes are configurable now.\n+There is a Config option to enable the Bedrock Sword!\n+Added a Statue of Herobrine structure.\n+Added Shrine Remnants structure.\n+Added Survivor Base structures.\n*Fixed parity between Minecraft versions!\n*Upgraded textures in 1.12.2.\n*MANY optimizations and minor bug fixes.", @@ -25,8 +27,8 @@ "0.5.4": "+Initial 1.16.5 release.\n*Updated Russian Translation.\n*Infected Llama now implements IMob so golems and similar entities now attack it.\n*Survivors now attack all hostile mobs properly.\n*Herobrine Statues now naturally spawn on all types of Stone.\n*Infected Llamas now have all the code from AbstractInfectedEntity properly copied over.\n*Many performance improvements to entities by guliver-jham.\n*Many miscellaneous minor performance and code improvements." }, "promos": { - "1.16.5-latest": "0.6.0", - "1.16.4-latest": "0.6.0", + "1.16.5-latest": "0.6.1", + "1.16.4-latest": "0.6.1", "1.15.2-latest": "0.5.4", "1.14.4-latest": "0.5.4", "1.12.2-latest": "0.5.4"