diff --git a/build.gradle b/build.gradle index d806d0c5..342c8ff8 100644 --- a/build.gradle +++ b/build.gradle @@ -51,8 +51,8 @@ dependencies { // api modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - modCompileOnly "dev.emi:emi:${emi_version}:api" - modLocalRuntime "dev.emi:emi:${emi_version}" +// modCompileOnly "dev.emi:emi:${emi_version}:api" +// modLocalRuntime "dev.emi:emi:${emi_version}" // mixin extras implementation("com.github.LlamaLad7:MixinExtras:0.1.1") diff --git a/src/main/java/jingy/jineric/base/JinericMain.java b/src/main/java/jingy/jineric/base/JinericMain.java index f2a26611..44a283d6 100644 --- a/src/main/java/jingy/jineric/base/JinericMain.java +++ b/src/main/java/jingy/jineric/base/JinericMain.java @@ -29,6 +29,7 @@ public void onInitialize() { LOGGER.info("Jineric Mod Main - Starting initialization"); JinericRegistries.registerJinericMod(); JinericItemGroups.registerItemGroups(); + JinericItemGroups.registerJinericItemGroups(); JinericPaintingVariant.registerPaintingMotives(); JinericStats.registerStats(); JinericBlockEntityType.registerBlockEntities(); diff --git a/src/main/java/jingy/jineric/base/plugins/JinericEmiPlugin.java b/src/main/java/jingy/jineric/base/plugins/JinericEmiPlugin.java index edd0c4f5..29ed1b29 100644 --- a/src/main/java/jingy/jineric/base/plugins/JinericEmiPlugin.java +++ b/src/main/java/jingy/jineric/base/plugins/JinericEmiPlugin.java @@ -1,11 +1,11 @@ -package jingy.jineric.base.plugins; - -import dev.emi.emi.api.EmiPlugin; -import dev.emi.emi.api.EmiRegistry; - -public class JinericEmiPlugin implements EmiPlugin { - @Override - public void register(EmiRegistry registry) { - - } -} +//package jingy.jineric.base.plugins; +// +//import dev.emi.emi.api.EmiPlugin; +//import dev.emi.emi.api.EmiRegistry; +// +//public class JinericEmiPlugin implements EmiPlugin { +// @Override +// public void register(EmiRegistry registry) { +// +// } +//} diff --git a/src/main/java/jingy/jineric/entity/passive/manxloaghtan/ManxLoaghtan.java b/src/main/java/jingy/jineric/entity/passive/manxloaghtan/ManxLoaghtan.java index 9ae7f98d..dd5cae6a 100644 --- a/src/main/java/jingy/jineric/entity/passive/manxloaghtan/ManxLoaghtan.java +++ b/src/main/java/jingy/jineric/entity/passive/manxloaghtan/ManxLoaghtan.java @@ -99,7 +99,7 @@ protected void mobTick() { @Override public void tickMovement() { - if (this.world.isClient) { + if (this.getWorld().isClient) { this.eatGrassTimer = Math.max(0, this.eatGrassTimer -1); } super.tickMovement(); @@ -152,7 +152,7 @@ public float getHeadPitch() { public ActionResult interactMob(PlayerEntity player, Hand hand) { ItemStack itemStack = player.getStackInHand(hand); if (itemStack.isOf(Items.SHEARS)) { - if (!this.world.isClient && this.isShearable()) { + if (!this.getWorld().isClient && this.isShearable()) { this.sheared(SoundCategory.PLAYERS); this.emitGameEvent(GameEvent.SHEAR, player); itemStack.damage(1, player, playerx -> playerx.sendToolBreakStatus(hand)); @@ -167,7 +167,7 @@ public ActionResult interactMob(PlayerEntity player, Hand hand) { @Override public void sheared(SoundCategory shearedSoundCategory) { - this.world.playSoundFromEntity((PlayerEntity)null, this, SoundEvents.ENTITY_SHEEP_SHEAR, shearedSoundCategory, 1.0F, 1.0F); + this.getWorld().playSoundFromEntity((PlayerEntity)null, this, SoundEvents.ENTITY_SHEEP_SHEAR, shearedSoundCategory, 1.0F, 1.0F); this.setSheared(true); int i = 1 + this.random.nextInt(3); diff --git a/src/main/java/jingy/jineric/item/JinericElytraItem.java b/src/main/java/jingy/jineric/item/JinericElytraItem.java index 746996dd..4595b7ae 100644 --- a/src/main/java/jingy/jineric/item/JinericElytraItem.java +++ b/src/main/java/jingy/jineric/item/JinericElytraItem.java @@ -41,7 +41,7 @@ public boolean useCustomElytra(LivingEntity entity, ItemStack chestStack, boolea public void doVanillaElytraTick(LivingEntity entity, ItemStack chestStack) { int nextRoll = entity.getRoll() + 1; - if (!entity.world.isClient && nextRoll % 10 == 0) { + if (!entity.getWorld().isClient && nextRoll % 10 == 0) { if ((nextRoll / 10) % 2 == 0) { chestStack.damage(1, entity, p -> p.sendEquipmentBreakStatus(EquipmentSlot.CHEST)); } diff --git a/src/main/java/jingy/jineric/item/JinericItemGroups.java b/src/main/java/jingy/jineric/item/JinericItemGroups.java index 05e5cb8f..fa9f78da 100644 --- a/src/main/java/jingy/jineric/item/JinericItemGroups.java +++ b/src/main/java/jingy/jineric/item/JinericItemGroups.java @@ -8,248 +8,251 @@ import net.minecraft.item.ItemGroups; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.text.Text; import net.minecraft.util.Identifier; -import org.spongepowered.include.com.google.common.collect.ImmutableMap; - -import java.util.Map; @SuppressWarnings("all") public class JinericItemGroups { - public static final ItemGroup MOD_ITEMS = FabricItemGroup.builder(new Identifier(JinericMain.MOD_ID, "mod_items")) - .displayName(Text.literal("Jineric Mod Items")) - .icon(() -> new ItemStack(JinericItems.PRISMARINE_CRYSTAL_BLOCK)) - .entries((enabledFeatures, entries) -> { - entries.add(JinericItems.POLISHED_STONE); - entries.add(JinericItems.POLISHED_STONE_STAIRS); - entries.add(JinericItems.POLISHED_STONE_SLAB); - entries.add(JinericItems.POLISHED_STONE_WALL); - entries.add(JinericItems.STONE_TILES); - entries.add(JinericItems.STONE_TILE_STAIRS); - entries.add(JinericItems.STONE_TILE_SLAB); - entries.add(JinericItems.STONE_TILE_WALL); - entries.add(JinericItems.DRIPSTONE_STAIRS); - entries.add(JinericItems.DRIPSTONE_SLAB); - entries.add(JinericItems.DRIPSTONE_WALL); - entries.add(JinericItems.COBBLED_DRIPSTONE); - entries.add(JinericItems.COBBLED_DRIPSTONE_STAIRS); - entries.add(JinericItems.COBBLED_DRIPSTONE_SLAB); - entries.add(JinericItems.COBBLED_DRIPSTONE_WALL); - entries.add(JinericItems.DRIPSTONE_BRICKS); - entries.add(JinericItems.DRIPSTONE_BRICK_STAIRS); - entries.add(JinericItems.DRIPSTONE_BRICK_SLAB); - entries.add(JinericItems.DRIPSTONE_BRICK_WALL); - entries.add(JinericItems.CRACKED_DRIPSTONE_BRICKS); - entries.add(JinericItems.CRACKED_DRIPSTONE_BRICK_STAIRS); - entries.add(JinericItems.CRACKED_DRIPSTONE_BRICK_SLAB); - entries.add(JinericItems.CRACKED_DRIPSTONE_BRICK_WALL); - entries.add(JinericItems.POLISHED_DRIPSTONE); - entries.add(JinericItems.POLISHED_DRIPSTONE_STAIRS); - entries.add(JinericItems.POLISHED_DRIPSTONE_SLAB); - entries.add(JinericItems.POLISHED_DRIPSTONE_WALL); - entries.add(JinericItems.DRIPSTONE_TILES); - entries.add(JinericItems.DRIPSTONE_TILE_SLAB); - entries.add(JinericItems.DRIPSTONE_TILE_STAIRS); - entries.add(JinericItems.DRIPSTONE_TILE_WALL); - entries.add(JinericItems.SMOOTH_DRIPSTONE); - entries.add(JinericItems.SMOOTH_DRIPSTONE_STAIRS); - entries.add(JinericItems.SMOOTH_DRIPSTONE_SLAB); - entries.add(JinericItems.SMOOTH_DRIPSTONE_WALL); - entries.add(JinericItems.CHISELED_DRIPSTONE); - entries.add(JinericItems.DRIPSTONE_PILLAR); - entries.add(JinericItems.FULL_GRASS_BLOCK); - entries.add(JinericItems.SMOOTH_SANDSTONE_WALL); - entries.add(JinericItems.CUT_SANDSTONE_STAIRS); - entries.add(JinericItems.CUT_SANDSTONE_WALL); - entries.add(JinericItems.POLISHED_SANDSTONE); - entries.add(JinericItems.POLISHED_SANDSTONE_SLAB); - entries.add(JinericItems.POLISHED_SANDSTONE_STAIRS); - entries.add(JinericItems.POLISHED_SANDSTONE_WALL); - entries.add(JinericItems.WAVY_SANDSTONE); - entries.add(JinericItems.WAVY_SANDSTONE_SLAB); - entries.add(JinericItems.WAVY_SANDSTONE_STAIRS); - entries.add(JinericItems.WAVY_SANDSTONE_WALL); - entries.add(JinericItems.SMOOTH_RED_SANDSTONE_WALL); - entries.add(JinericItems.CUT_RED_SANDSTONE_STAIRS); - entries.add(JinericItems.CUT_RED_SANDSTONE_WALL); - entries.add(JinericItems.POLISHED_RED_SANDSTONE); - entries.add(JinericItems.POLISHED_RED_SANDSTONE_STAIRS); - entries.add(JinericItems.POLISHED_RED_SANDSTONE_SLAB); - entries.add(JinericItems.POLISHED_RED_SANDSTONE_WALL); - entries.add(JinericItems.WAVY_RED_SANDSTONE); - entries.add(JinericItems.WAVY_RED_SANDSTONE_STAIRS); - entries.add(JinericItems.WAVY_RED_SANDSTONE_SLAB); - entries.add(JinericItems.WAVY_RED_SANDSTONE_WALL); - entries.add(JinericItems.SOUL_SANDSTONE); - entries.add(JinericItems.SOUL_SANDSTONE_SLAB); - entries.add(JinericItems.SOUL_SANDSTONE_STAIRS); - entries.add(JinericItems.SOUL_SANDSTONE_WALL); - entries.add(JinericItems.CUT_SOUL_SANDSTONE); - entries.add(JinericItems.CUT_SOUL_SANDSTONE_SLAB); - entries.add(JinericItems.CUT_SOUL_SANDSTONE_STAIRS); - entries.add(JinericItems.CUT_SOUL_SANDSTONE_WALL); - entries.add(JinericItems.POLISHED_SOUL_SANDSTONE); - entries.add(JinericItems.POLISHED_SOUL_SANDSTONE_SLAB); - entries.add(JinericItems.POLISHED_SOUL_SANDSTONE_STAIRS); - entries.add(JinericItems.POLISHED_SOUL_SANDSTONE_WALL); - entries.add(JinericItems.CHISELED_SOUL_SANDSTONE); - entries.add(JinericItems.SMOOTH_SOUL_SANDSTONE); - entries.add(JinericItems.SMOOTH_SOUL_SANDSTONE_SLAB); - entries.add(JinericItems.SMOOTH_SOUL_SANDSTONE_STAIRS); - entries.add(JinericItems.SMOOTH_SOUL_SANDSTONE_WALL); - entries.add(JinericItems.WAVY_SOUL_SANDSTONE); - entries.add(JinericItems.WAVY_SOUL_SANDSTONE_SLAB); - entries.add(JinericItems.WAVY_SOUL_SANDSTONE_STAIRS); - entries.add(JinericItems.WAVY_SOUL_SANDSTONE_WALL); - entries.add(JinericItems.STONE_WALL); - entries.add(JinericItems.CRACKED_STONE_BRICK_STAIRS); - entries.add(JinericItems.CRACKED_STONE_BRICK_SLAB); - entries.add(JinericItems.CRACKED_STONE_BRICK_WALL); - entries.add(JinericItems.STONE_PILLAR); - entries.add(JinericItems.CRACKED_DEEPSLATE_BRICK_STAIRS); - entries.add(JinericItems.CRACKED_DEEPSLATE_BRICK_SLAB); - entries.add(JinericItems.CRACKED_DEEPSLATE_BRICK_WALL); - entries.add(JinericItems.CRACKED_DEEPSLATE_TILE_STAIRS); - entries.add(JinericItems.CRACKED_DEEPSLATE_TILE_SLAB); - entries.add(JinericItems.CRACKED_DEEPSLATE_TILE_WALL); - entries.add(JinericItems.SMOOTH_STONE_STAIRS); - entries.add(JinericItems.SMOOTH_STONE_WALL); - entries.add(JinericItems.SMOOTH_DEEPSLATE); - entries.add(JinericItems.SMOOTH_DEEPSLATE_STAIRS); - entries.add(JinericItems.SMOOTH_DEEPSLATE_SLAB); - entries.add(JinericItems.SMOOTH_DEEPSLATE_WALL); - entries.add(JinericItems.DARK_PRISMARINE_WALL); - entries.add(JinericItems.PRISMARINE_BRICK_WALL); - entries.add(JinericItems.POLISHED_GRANITE_WALL); - entries.add(JinericItems.POLISHED_DIORITE_WALL); - entries.add(JinericItems.POLISHED_ANDESITE_WALL); - entries.add(JinericItems.TUFF_STAIRS); - entries.add(JinericItems.TUFF_SLAB); - entries.add(JinericItems.TUFF_WALL); - entries.add(JinericItems.CALCITE_STAIRS); - entries.add(JinericItems.CALCITE_SLAB); - entries.add(JinericItems.CALCITE_WALL); - entries.add(JinericItems.SNOW_BRICKS); - entries.add(JinericItems.SNOW_BRICK_STAIRS); - entries.add(JinericItems.SNOW_BRICK_SLAB); - entries.add(JinericItems.SNOW_BRICK_WALL); - entries.add(JinericItems.SNOW_WALL); - entries.add(JinericItems.PACKED_ICE_STAIRS); - entries.add(JinericItems.PACKED_ICE_SLAB); - entries.add(JinericItems.PACKED_ICE_WALL); - entries.add(JinericItems.OBSIDIAN_STAIRS); - entries.add(JinericItems.OBSIDIAN_SLAB); - entries.add(JinericItems.OBSIDIAN_WALL); - entries.add(JinericItems.QUARTZ_WALL); - entries.add(JinericItems.SMOOTH_QUARTZ_WALL); - entries.add(JinericItems.QUARTZ_BRICK_STAIRS); - entries.add(JinericItems.QUARTZ_BRICK_SLAB); - entries.add(JinericItems.QUARTZ_BRICK_WALL); - entries.add(JinericItems.CRACKED_NETHER_BRICK_STAIRS); - entries.add(JinericItems.CRACKED_NETHER_BRICK_SLAB); - entries.add(JinericItems.CRACKED_NETHER_BRICK_WALL); - entries.add(JinericItems.RED_NETHER_BRICK_FENCE); - entries.add(JinericItems.CRACKED_POLISHED_BLACKSTONE_BRICK_STAIRS); - entries.add(JinericItems.CRACKED_POLISHED_BLACKSTONE_BRICK_SLAB); - entries.add(JinericItems.CRACKED_POLISHED_BLACKSTONE_BRICK_WALL); - entries.add(JinericItems.SMOOTH_BASALT_STAIRS); - entries.add(JinericItems.SMOOTH_BASALT_SLAB); - entries.add(JinericItems.SMOOTH_BASALT_WALL); - entries.add(JinericItems.PURPUR_WALL); - entries.add(JinericItems.CUT_COPPER_WALL); - entries.add(JinericItems.EXPOSED_CUT_COPPER_WALL); - entries.add(JinericItems.WEATHERED_CUT_COPPER_WALL); - entries.add(JinericItems.OXIDIZED_CUT_COPPER_WALL); - entries.add(JinericItems.WAXED_CUT_COPPER_WALL); - entries.add(JinericItems.WAXED_EXPOSED_CUT_COPPER_WALL); - entries.add(JinericItems.WAXED_WEATHERED_CUT_COPPER_WALL); - entries.add(JinericItems.WAXED_OXIDIZED_CUT_COPPER_WALL); - entries.add(JinericItems.CHARCOAL_BLOCK); - entries.add(JinericItems.FLINT_BLOCK); - entries.add(JinericItems.BONE_MEAL_BLOCK); - entries.add(JinericItems.PRISMARINE_CRYSTAL_BLOCK); - entries.add(JinericItems.SUGAR_BLOCK); - entries.add(JinericItems.ROTTEN_FLESH_BLOCK); - entries.add(JinericItems.STICK_BLOCK); - entries.add(JinericItems.EGG_BLOCK); - entries.add(JinericItems.ENDER_PEARL_BLOCK); - entries.add(JinericItems.PAPER_BLOCK); - entries.add(JinericItems.BLAZE_ROD_BLOCK); - entries.add(JinericItems.SPRUCE_BOOKSHELF); - entries.add(JinericItems.BIRCH_BOOKSHELF); - entries.add(JinericItems.JUNGLE_BOOKSHELF); - entries.add(JinericItems.ACACIA_BOOKSHELF); - entries.add(JinericItems.DARK_OAK_BOOKSHELF); - entries.add(JinericItems.MANGROVE_BOOKSHELF); - entries.add(JinericItems.CRIMSON_BOOKSHELF); - entries.add(JinericItems.WARPED_BOOKSHELF); - entries.add(JinericItems.SPRUCE_CHEST); - entries.add(JinericItems.BIRCH_CHEST); - entries.add(JinericItems.JUNGLE_CHEST); - entries.add(JinericItems.ACACIA_CHEST); - entries.add(JinericItems.DARK_OAK_CHEST); - entries.add(JinericItems.MANGROVE_CHEST); - entries.add(JinericItems.CRIMSON_CHEST); - entries.add(JinericItems.WARPED_CHEST); - entries.add(JinericItems.TRAPPED_SPRUCE_CHEST); - entries.add(JinericItems.TRAPPED_BIRCH_CHEST); - entries.add(JinericItems.TRAPPED_JUNGLE_CHEST); - entries.add(JinericItems.TRAPPED_ACACIA_CHEST); - entries.add(JinericItems.TRAPPED_DARK_OAK_CHEST); - entries.add(JinericItems.TRAPPED_MANGROVE_CHEST); - entries.add(JinericItems.TRAPPED_CRIMSON_CHEST); - entries.add(JinericItems.TRAPPED_WARPED_CHEST); - entries.add(JinericItems.SPRUCE_LADDER); - entries.add(JinericItems.BIRCH_LADDER); - entries.add(JinericItems.JUNGLE_LADDER); - entries.add(JinericItems.ACACIA_LADDER); - entries.add(JinericItems.DARK_OAK_LADDER); - entries.add(JinericItems.MANGROVE_LADDER); - entries.add(JinericItems.WARPED_LADDER); - entries.add(JinericItems.CRIMSON_LADDER); - entries.add(JinericItems.SOUL_JACK_O_LANTERN); - entries.add(JinericItems.NETHERITE_HORSE_ARMOR); - entries.add(JinericItems.TUMBLEWEED); - entries.add(JinericItems.REFINERY); - entries.add(JinericItems.FIREWEED); - entries.add(JinericItems.COBBLED_TUFF); - entries.add(JinericItems.COBBLED_TUFF_SLAB); - entries.add(JinericItems.COBBLED_TUFF_STAIRS); - entries.add(JinericItems.COBBLED_TUFF_WALL); - entries.add(JinericItems.SMOOTH_TUFF); - entries.add(JinericItems.SMOOTH_TUFF_STAIRS); - entries.add(JinericItems.SMOOTH_TUFF_SLAB); - entries.add(JinericItems.SMOOTH_TUFF_WALL); - entries.add(JinericItems.POLISHED_TUFF); - entries.add(JinericItems.POLISHED_TUFF_STAIRS); - entries.add(JinericItems.POLISHED_TUFF_SLAB); - entries.add(JinericItems.POLISHED_TUFF_WALL); - entries.add(JinericItems.TUFF_BRICKS); - entries.add(JinericItems.TUFF_BRICK_STAIRS); - entries.add(JinericItems.TUFF_BRICK_SLAB); - entries.add(JinericItems.TUFF_BRICK_WALL); - entries.add(JinericItems.CRACKED_TUFF_BRICKS); - entries.add(JinericItems.CRACKED_TUFF_BRICK_STAIRS); - entries.add(JinericItems.CRACKED_TUFF_BRICK_SLAB); - entries.add(JinericItems.CRACKED_TUFF_BRICK_WALL); - entries.add(JinericItems.CHISELED_TUFF); - entries.add(JinericItems.TUFF_PILLAR); - entries.add(JinericItems.TUFF_TILES); - entries.add(JinericItems.TUFF_TILE_SLAB); - entries.add(JinericItems.TUFF_TILE_STAIRS); - entries.add(JinericItems.TUFF_TILE_WALL); + private static final RegistryKey MOD_ITEMS = RegistryKey.of( + RegistryKeys.ITEM_GROUP, new Identifier(JinericMain.MOD_ID, "mod_items") + ); + + public static void registerJinericItemGroups() { + Registry.register(Registries.ITEM_GROUP, MOD_ITEMS, FabricItemGroup.builder() + .displayName(Text.literal("Jineric Mod Items")) + .icon(() -> new ItemStack(JinericItems.PRISMARINE_CRYSTAL_BLOCK)) + .entries((displayContext, entries) -> { + entries.add(JinericItems.POLISHED_STONE); + entries.add(JinericItems.POLISHED_STONE_STAIRS); + entries.add(JinericItems.POLISHED_STONE_SLAB); + entries.add(JinericItems.POLISHED_STONE_WALL); + entries.add(JinericItems.STONE_TILES); + entries.add(JinericItems.STONE_TILE_STAIRS); + entries.add(JinericItems.STONE_TILE_SLAB); + entries.add(JinericItems.STONE_TILE_WALL); + entries.add(JinericItems.DRIPSTONE_STAIRS); + entries.add(JinericItems.DRIPSTONE_SLAB); + entries.add(JinericItems.DRIPSTONE_WALL); + entries.add(JinericItems.COBBLED_DRIPSTONE); + entries.add(JinericItems.COBBLED_DRIPSTONE_STAIRS); + entries.add(JinericItems.COBBLED_DRIPSTONE_SLAB); + entries.add(JinericItems.COBBLED_DRIPSTONE_WALL); + entries.add(JinericItems.DRIPSTONE_BRICKS); + entries.add(JinericItems.DRIPSTONE_BRICK_STAIRS); + entries.add(JinericItems.DRIPSTONE_BRICK_SLAB); + entries.add(JinericItems.DRIPSTONE_BRICK_WALL); + entries.add(JinericItems.CRACKED_DRIPSTONE_BRICKS); + entries.add(JinericItems.CRACKED_DRIPSTONE_BRICK_STAIRS); + entries.add(JinericItems.CRACKED_DRIPSTONE_BRICK_SLAB); + entries.add(JinericItems.CRACKED_DRIPSTONE_BRICK_WALL); + entries.add(JinericItems.POLISHED_DRIPSTONE); + entries.add(JinericItems.POLISHED_DRIPSTONE_STAIRS); + entries.add(JinericItems.POLISHED_DRIPSTONE_SLAB); + entries.add(JinericItems.POLISHED_DRIPSTONE_WALL); + entries.add(JinericItems.DRIPSTONE_TILES); + entries.add(JinericItems.DRIPSTONE_TILE_SLAB); + entries.add(JinericItems.DRIPSTONE_TILE_STAIRS); + entries.add(JinericItems.DRIPSTONE_TILE_WALL); + entries.add(JinericItems.SMOOTH_DRIPSTONE); + entries.add(JinericItems.SMOOTH_DRIPSTONE_STAIRS); + entries.add(JinericItems.SMOOTH_DRIPSTONE_SLAB); + entries.add(JinericItems.SMOOTH_DRIPSTONE_WALL); + entries.add(JinericItems.CHISELED_DRIPSTONE); + entries.add(JinericItems.DRIPSTONE_PILLAR); + entries.add(JinericItems.FULL_GRASS_BLOCK); + entries.add(JinericItems.SMOOTH_SANDSTONE_WALL); + entries.add(JinericItems.CUT_SANDSTONE_STAIRS); + entries.add(JinericItems.CUT_SANDSTONE_WALL); + entries.add(JinericItems.POLISHED_SANDSTONE); + entries.add(JinericItems.POLISHED_SANDSTONE_SLAB); + entries.add(JinericItems.POLISHED_SANDSTONE_STAIRS); + entries.add(JinericItems.POLISHED_SANDSTONE_WALL); + entries.add(JinericItems.WAVY_SANDSTONE); + entries.add(JinericItems.WAVY_SANDSTONE_SLAB); + entries.add(JinericItems.WAVY_SANDSTONE_STAIRS); + entries.add(JinericItems.WAVY_SANDSTONE_WALL); + entries.add(JinericItems.SMOOTH_RED_SANDSTONE_WALL); + entries.add(JinericItems.CUT_RED_SANDSTONE_STAIRS); + entries.add(JinericItems.CUT_RED_SANDSTONE_WALL); + entries.add(JinericItems.POLISHED_RED_SANDSTONE); + entries.add(JinericItems.POLISHED_RED_SANDSTONE_STAIRS); + entries.add(JinericItems.POLISHED_RED_SANDSTONE_SLAB); + entries.add(JinericItems.POLISHED_RED_SANDSTONE_WALL); + entries.add(JinericItems.WAVY_RED_SANDSTONE); + entries.add(JinericItems.WAVY_RED_SANDSTONE_STAIRS); + entries.add(JinericItems.WAVY_RED_SANDSTONE_SLAB); + entries.add(JinericItems.WAVY_RED_SANDSTONE_WALL); + entries.add(JinericItems.SOUL_SANDSTONE); + entries.add(JinericItems.SOUL_SANDSTONE_SLAB); + entries.add(JinericItems.SOUL_SANDSTONE_STAIRS); + entries.add(JinericItems.SOUL_SANDSTONE_WALL); + entries.add(JinericItems.CUT_SOUL_SANDSTONE); + entries.add(JinericItems.CUT_SOUL_SANDSTONE_SLAB); + entries.add(JinericItems.CUT_SOUL_SANDSTONE_STAIRS); + entries.add(JinericItems.CUT_SOUL_SANDSTONE_WALL); + entries.add(JinericItems.POLISHED_SOUL_SANDSTONE); + entries.add(JinericItems.POLISHED_SOUL_SANDSTONE_SLAB); + entries.add(JinericItems.POLISHED_SOUL_SANDSTONE_STAIRS); + entries.add(JinericItems.POLISHED_SOUL_SANDSTONE_WALL); + entries.add(JinericItems.CHISELED_SOUL_SANDSTONE); + entries.add(JinericItems.SMOOTH_SOUL_SANDSTONE); + entries.add(JinericItems.SMOOTH_SOUL_SANDSTONE_SLAB); + entries.add(JinericItems.SMOOTH_SOUL_SANDSTONE_STAIRS); + entries.add(JinericItems.SMOOTH_SOUL_SANDSTONE_WALL); + entries.add(JinericItems.WAVY_SOUL_SANDSTONE); + entries.add(JinericItems.WAVY_SOUL_SANDSTONE_SLAB); + entries.add(JinericItems.WAVY_SOUL_SANDSTONE_STAIRS); + entries.add(JinericItems.WAVY_SOUL_SANDSTONE_WALL); + entries.add(JinericItems.STONE_WALL); + entries.add(JinericItems.CRACKED_STONE_BRICK_STAIRS); + entries.add(JinericItems.CRACKED_STONE_BRICK_SLAB); + entries.add(JinericItems.CRACKED_STONE_BRICK_WALL); + entries.add(JinericItems.STONE_PILLAR); + entries.add(JinericItems.CRACKED_DEEPSLATE_BRICK_STAIRS); + entries.add(JinericItems.CRACKED_DEEPSLATE_BRICK_SLAB); + entries.add(JinericItems.CRACKED_DEEPSLATE_BRICK_WALL); + entries.add(JinericItems.CRACKED_DEEPSLATE_TILE_STAIRS); + entries.add(JinericItems.CRACKED_DEEPSLATE_TILE_SLAB); + entries.add(JinericItems.CRACKED_DEEPSLATE_TILE_WALL); + entries.add(JinericItems.SMOOTH_STONE_STAIRS); + entries.add(JinericItems.SMOOTH_STONE_WALL); + entries.add(JinericItems.SMOOTH_DEEPSLATE); + entries.add(JinericItems.SMOOTH_DEEPSLATE_STAIRS); + entries.add(JinericItems.SMOOTH_DEEPSLATE_SLAB); + entries.add(JinericItems.SMOOTH_DEEPSLATE_WALL); + entries.add(JinericItems.DARK_PRISMARINE_WALL); + entries.add(JinericItems.PRISMARINE_BRICK_WALL); + entries.add(JinericItems.POLISHED_GRANITE_WALL); + entries.add(JinericItems.POLISHED_DIORITE_WALL); + entries.add(JinericItems.POLISHED_ANDESITE_WALL); + entries.add(JinericItems.TUFF_STAIRS); + entries.add(JinericItems.TUFF_SLAB); + entries.add(JinericItems.TUFF_WALL); + entries.add(JinericItems.CALCITE_STAIRS); + entries.add(JinericItems.CALCITE_SLAB); + entries.add(JinericItems.CALCITE_WALL); + entries.add(JinericItems.SNOW_WALL); + entries.add(JinericItems.PACKED_ICE_STAIRS); + entries.add(JinericItems.PACKED_ICE_SLAB); + entries.add(JinericItems.PACKED_ICE_WALL); + entries.add(JinericItems.OBSIDIAN_STAIRS); + entries.add(JinericItems.OBSIDIAN_SLAB); + entries.add(JinericItems.OBSIDIAN_WALL); + entries.add(JinericItems.QUARTZ_WALL); + entries.add(JinericItems.SMOOTH_QUARTZ_WALL); + entries.add(JinericItems.QUARTZ_BRICK_STAIRS); + entries.add(JinericItems.QUARTZ_BRICK_SLAB); + entries.add(JinericItems.QUARTZ_BRICK_WALL); + entries.add(JinericItems.CRACKED_NETHER_BRICK_STAIRS); + entries.add(JinericItems.CRACKED_NETHER_BRICK_SLAB); + entries.add(JinericItems.CRACKED_NETHER_BRICK_WALL); + entries.add(JinericItems.RED_NETHER_BRICK_FENCE); + entries.add(JinericItems.CRACKED_POLISHED_BLACKSTONE_BRICK_STAIRS); + entries.add(JinericItems.CRACKED_POLISHED_BLACKSTONE_BRICK_SLAB); + entries.add(JinericItems.CRACKED_POLISHED_BLACKSTONE_BRICK_WALL); + entries.add(JinericItems.SMOOTH_BASALT_STAIRS); + entries.add(JinericItems.SMOOTH_BASALT_SLAB); + entries.add(JinericItems.SMOOTH_BASALT_WALL); + entries.add(JinericItems.PURPUR_WALL); + entries.add(JinericItems.CUT_COPPER_WALL); + entries.add(JinericItems.EXPOSED_CUT_COPPER_WALL); + entries.add(JinericItems.WEATHERED_CUT_COPPER_WALL); + entries.add(JinericItems.OXIDIZED_CUT_COPPER_WALL); + entries.add(JinericItems.WAXED_CUT_COPPER_WALL); + entries.add(JinericItems.WAXED_EXPOSED_CUT_COPPER_WALL); + entries.add(JinericItems.WAXED_WEATHERED_CUT_COPPER_WALL); + entries.add(JinericItems.WAXED_OXIDIZED_CUT_COPPER_WALL); + entries.add(JinericItems.CHARCOAL_BLOCK); + entries.add(JinericItems.FLINT_BLOCK); + entries.add(JinericItems.BONE_MEAL_BLOCK); + entries.add(JinericItems.PRISMARINE_CRYSTAL_BLOCK); + entries.add(JinericItems.SUGAR_BLOCK); + entries.add(JinericItems.ROTTEN_FLESH_BLOCK); + entries.add(JinericItems.STICK_BLOCK); + entries.add(JinericItems.EGG_BLOCK); + entries.add(JinericItems.ENDER_PEARL_BLOCK); + entries.add(JinericItems.PAPER_BLOCK); + entries.add(JinericItems.BLAZE_ROD_BLOCK); + entries.add(JinericItems.SPRUCE_BOOKSHELF); + entries.add(JinericItems.BIRCH_BOOKSHELF); + entries.add(JinericItems.JUNGLE_BOOKSHELF); + entries.add(JinericItems.ACACIA_BOOKSHELF); + entries.add(JinericItems.DARK_OAK_BOOKSHELF); + entries.add(JinericItems.MANGROVE_BOOKSHELF); + entries.add(JinericItems.CRIMSON_BOOKSHELF); + entries.add(JinericItems.WARPED_BOOKSHELF); + entries.add(JinericItems.SPRUCE_CHEST); + entries.add(JinericItems.BIRCH_CHEST); + entries.add(JinericItems.JUNGLE_CHEST); + entries.add(JinericItems.ACACIA_CHEST); + entries.add(JinericItems.DARK_OAK_CHEST); + entries.add(JinericItems.MANGROVE_CHEST); + entries.add(JinericItems.CRIMSON_CHEST); + entries.add(JinericItems.WARPED_CHEST); + entries.add(JinericItems.TRAPPED_SPRUCE_CHEST); + entries.add(JinericItems.TRAPPED_BIRCH_CHEST); + entries.add(JinericItems.TRAPPED_JUNGLE_CHEST); + entries.add(JinericItems.TRAPPED_ACACIA_CHEST); + entries.add(JinericItems.TRAPPED_DARK_OAK_CHEST); + entries.add(JinericItems.TRAPPED_MANGROVE_CHEST); + entries.add(JinericItems.TRAPPED_CRIMSON_CHEST); + entries.add(JinericItems.TRAPPED_WARPED_CHEST); + entries.add(JinericItems.SPRUCE_LADDER); + entries.add(JinericItems.BIRCH_LADDER); + entries.add(JinericItems.JUNGLE_LADDER); + entries.add(JinericItems.ACACIA_LADDER); + entries.add(JinericItems.DARK_OAK_LADDER); + entries.add(JinericItems.MANGROVE_LADDER); + entries.add(JinericItems.WARPED_LADDER); + entries.add(JinericItems.CRIMSON_LADDER); + entries.add(JinericItems.SOUL_JACK_O_LANTERN); + entries.add(JinericItems.NETHERITE_HORSE_ARMOR); + entries.add(JinericItems.TUMBLEWEED); + entries.add(JinericItems.REFINERY); + entries.add(JinericItems.FIREWEED); + entries.add(JinericItems.COBBLED_TUFF); + entries.add(JinericItems.COBBLED_TUFF_SLAB); + entries.add(JinericItems.COBBLED_TUFF_STAIRS); + entries.add(JinericItems.COBBLED_TUFF_WALL); + entries.add(JinericItems.SMOOTH_TUFF); + entries.add(JinericItems.SMOOTH_TUFF_STAIRS); + entries.add(JinericItems.SMOOTH_TUFF_SLAB); + entries.add(JinericItems.SMOOTH_TUFF_WALL); + entries.add(JinericItems.POLISHED_TUFF); + entries.add(JinericItems.POLISHED_TUFF_STAIRS); + entries.add(JinericItems.POLISHED_TUFF_SLAB); + entries.add(JinericItems.POLISHED_TUFF_WALL); + entries.add(JinericItems.TUFF_BRICKS); + entries.add(JinericItems.TUFF_BRICK_STAIRS); + entries.add(JinericItems.TUFF_BRICK_SLAB); + entries.add(JinericItems.TUFF_BRICK_WALL); + entries.add(JinericItems.CRACKED_TUFF_BRICKS); + entries.add(JinericItems.CRACKED_TUFF_BRICK_STAIRS); + entries.add(JinericItems.CRACKED_TUFF_BRICK_SLAB); + entries.add(JinericItems.CRACKED_TUFF_BRICK_WALL); + entries.add(JinericItems.CHISELED_TUFF); + entries.add(JinericItems.TUFF_PILLAR); + entries.add(JinericItems.TUFF_TILES); + entries.add(JinericItems.TUFF_TILE_SLAB); + entries.add(JinericItems.TUFF_TILE_STAIRS); + entries.add(JinericItems.TUFF_TILE_WALL); + // entries.add(JinericItems.SHULKER_CHEST); - entries.add(JinericItems.GOLDEN_POTATO); - entries.add(JinericItems.GOLDEN_SWEET_BERRIES); - entries.add(JinericItems.GOLDEN_BEETROOT); + entries.add(JinericItems.GOLDEN_POTATO); + entries.add(JinericItems.GOLDEN_SWEET_BERRIES); + entries.add(JinericItems.GOLDEN_BEETROOT); // entries.add(JinericItems.MANX_LOAGHTAN_SPAWN_EGG); // entries.add(JinericItems.SALT); // entries.add(JinericItems.SALT_BLOCK); // entries.add(JinericItems.FROZEN_ELYTRA); - entries.add(JinericItems.REDSTONE_LANTERN); - entries.add(JinericItems.REDSTONE_CAMPFIRE); - entries.add(JinericItems.IRON_UPGRADE_SMITHING_TEMPLATE); + entries.add(JinericItems.REDSTONE_LANTERN); + entries.add(JinericItems.REDSTONE_CAMPFIRE); + entries.add(JinericItems.IRON_UPGRADE_SMITHING_TEMPLATE); // entries.add(JinericItems.); // entries.add(JinericItems.POLISHED_CALCITE); // entries.add(JinericItems.POLISHED_CALCITE_STAIRS); @@ -263,10 +266,12 @@ public class JinericItemGroups { // entries.add(JinericItems.SMOOTH_CALCITE_STAIRS); // entries.add(JinericItems.SMOOTH_CALCITE_SLAB); // entries.add(JinericItems.SMOOTH_CALCITE_WALL); - }).build(); + }).build() + ); + } - public static final Identifier MOD_ITEMS_ID = new Identifier("jineric:mod_items"); - public static final Map GROUP_ID_MAP = new ImmutableMap.Builder().put(MOD_ITEMS, MOD_ITEMS_ID).build(); +// public static final Identifier MOD_ITEMS_ID = new Identifier("jineric:mod_items"); +// public static final Map GROUP_ID_MAP = new ImmutableMap.Builder().put(MOD_ITEMS, MOD_ITEMS_ID).build(); public static void registerItemGroups() { ItemGroupEvents.modifyEntriesEvent(ItemGroups.BUILDING_BLOCKS).register((entries) -> { diff --git a/src/main/java/jingy/jineric/mixin/EnchantingTableBlockMixin.java b/src/main/java/jingy/jineric/mixin/EnchantingTableBlockMixin.java index e9c86328..2e4e0202 100644 --- a/src/main/java/jingy/jineric/mixin/EnchantingTableBlockMixin.java +++ b/src/main/java/jingy/jineric/mixin/EnchantingTableBlockMixin.java @@ -1,18 +1,8 @@ package jingy.jineric.mixin; -import jingy.jineric.tag.JinericBlockTags; -import net.minecraft.block.BlockState; import net.minecraft.block.BlockWithEntity; import net.minecraft.block.EnchantingTableBlock; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.block.entity.EnchantingTableBlockEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(EnchantingTableBlock.class) public abstract class EnchantingTableBlockMixin extends BlockWithEntity { @@ -20,17 +10,11 @@ public EnchantingTableBlockMixin(Settings settings) { super(settings); } - @Inject(method = "canAccessBookshelf(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Z", at = @At("HEAD"), cancellable = true) - private static void jineric$canAccessBookshelf(World world, BlockPos tablePos, BlockPos bookshelfOffset, CallbackInfoReturnable cir) { - if (world.getBlockState(tablePos.add(bookshelfOffset)).isIn(JinericBlockTags.WOODEN_BOOKSHELVES) - && world.isAir(tablePos.add(bookshelfOffset.getX() / 2, bookshelfOffset.getY(), bookshelfOffset.getZ() / 2))) { - cir.setReturnValue(true); - } - } - - @Nullable - @Override - public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { - return new EnchantingTableBlockEntity(pos, state); - } +// @Inject(method = "canAccessBookshelf(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Z", at = @At("HEAD"), cancellable = true) +// private static void jineric$canAccessBookshelf(World world, BlockPos tablePos, BlockPos bookshelfOffset, CallbackInfoReturnable cir) { +// if (world.getBlockState(tablePos.add(bookshelfOffset)).isIn(JinericBlockTags.WOODEN_BOOKSHELVES) +// && world.isAir(tablePos.add(bookshelfOffset.getX() / 2, bookshelfOffset.getY(), bookshelfOffset.getZ() / 2))) { +// cir.setReturnValue(true); +// } +// } } diff --git a/src/main/java/jingy/jineric/mixin/LivingEntityMixin.java b/src/main/java/jingy/jineric/mixin/LivingEntityMixin.java index 47cb35af..0357f649 100644 --- a/src/main/java/jingy/jineric/mixin/LivingEntityMixin.java +++ b/src/main/java/jingy/jineric/mixin/LivingEntityMixin.java @@ -26,11 +26,11 @@ public LivingEntityMixin(EntityType type, World world) { protected void jineric$handleSoulSpeedForSlabsAndFences(CallbackInfoReturnable cir) { // check feet pos block BlockPos pos = getBlockPos(); - if (world.getBlockState(pos).isIn(BlockTags.SOUL_SPEED_BLOCKS)) { + if (getWorld().getBlockState(pos).isIn(BlockTags.SOUL_SPEED_BLOCKS)) { cir.setReturnValue(true); } // check head pos block - if (world.getBlockState(pos.up()).isIn(BlockTags.SOUL_SPEED_BLOCKS)) { + if (getWorld().getBlockState(pos.up()).isIn(BlockTags.SOUL_SPEED_BLOCKS)) { cir.setReturnValue(true); } } @@ -42,7 +42,7 @@ public LivingEntityMixin(EntityType type, World world) { @SuppressWarnings("InvalidInjectorMethodSignature") public float jineric$setSlipperiness(float p) { BlockPos pos = getBlockPos(); - BlockState state = world.getBlockState(pos); + BlockState state = getWorld().getBlockState(pos); if (isOnGround() && JinericBlocks.isSlipperyBlock(state)) { // if Y is a perfect integer, we're on a full block. // Otherwise, get friction from the block the entity is in, not on. diff --git a/src/main/java/jingy/jineric/mixin/TurtleEntityMixin.java b/src/main/java/jingy/jineric/mixin/TurtleEntityMixin.java index a370654f..825cc0db 100644 --- a/src/main/java/jingy/jineric/mixin/TurtleEntityMixin.java +++ b/src/main/java/jingy/jineric/mixin/TurtleEntityMixin.java @@ -78,7 +78,7 @@ public boolean canBeSaddled() { public void saddle(@Nullable SoundCategory sound) { this.jineric$saddledComponent.setSaddled(true); if (sound != null) { - this.world.playSoundFromEntity((PlayerEntity)null, this, SoundEvents.ENTITY_STRIDER_SADDLE, sound, 0.5F, 1.0F); + this.getWorld().playSoundFromEntity((PlayerEntity)null, this, SoundEvents.ENTITY_STRIDER_SADDLE, sound, 0.5F, 1.0F); } } @@ -89,7 +89,7 @@ public SoundEvent getSaddleSound() { @Override public void onTrackedDataSet(TrackedData data) { - if (BOOST_TIME.equals(data) && this.world.isClient) { + if (BOOST_TIME.equals(data) && this.getWorld().isClient) { this.jineric$saddledComponent.boost(); } @@ -100,11 +100,11 @@ public void onTrackedDataSet(TrackedData data) { public ActionResult interactMob(PlayerEntity player, Hand hand) { boolean bl = this.isBreedingItem(player.getStackInHand(hand)); if (!bl && this.isSaddled() && !this.hasPassengers() && !player.shouldCancelInteraction()) { - if (!this.world.isClient) { + if (!this.getWorld().isClient) { player.startRiding(this); } - return ActionResult.success(this.world.isClient); + return ActionResult.success(this.getWorld().isClient); } else { ActionResult actionResult = super.interactMob(player, hand); if (!actionResult.isAccepted()) { diff --git a/src/main/java/jingy/jineric/registry/JinericBlockMaterials.java b/src/main/java/jingy/jineric/registry/JinericBlockMaterials.java deleted file mode 100644 index 30fcce75..00000000 --- a/src/main/java/jingy/jineric/registry/JinericBlockMaterials.java +++ /dev/null @@ -1,16 +0,0 @@ -package jingy.jineric.registry; - -import net.minecraft.block.MapColor; -import net.minecraft.block.Material; -import net.minecraft.block.piston.PistonBehavior; - -public class JinericBlockMaterials { - public static final Material OBSIDIAN = new Material( - MapColor.BLACK, false, true, true, true, false, false, PistonBehavior.BLOCK - ); - - public static final Material SHULKER_CHEST_MATERIAL = new Material( - MapColor.PURPLE, false, true, true, true, false, false, PistonBehavior.BLOCK - ); - -} diff --git a/src/main/java/jingy/jineric/registry/JinericBlockSettings.java b/src/main/java/jingy/jineric/registry/JinericBlockSettings.java index 7015b02e..4a456d18 100644 --- a/src/main/java/jingy/jineric/registry/JinericBlockSettings.java +++ b/src/main/java/jingy/jineric/registry/JinericBlockSettings.java @@ -15,7 +15,7 @@ public class JinericBlockSettings extends Blocks { public static FabricBlockSettings soulSandstoneSettings() { return FabricBlockSettings - .of(Material.STONE) + .copyOf(STONE) .requiresTool() .strength(0.8f, 4f) .sounds(JinericBlockSoundGroup.SOUL_SANDSTONE) @@ -24,14 +24,13 @@ public static FabricBlockSettings soulSandstoneSettings() { } public static FabricBlockSettings obsidianSettings() { - return FabricBlockSettings - .of(JinericBlockMaterials.OBSIDIAN, MapColor.BLACK) + return FabricBlockSettings.copyOf(OBSIDIAN) .requiresTool() .strength(50.0F, 1200.0F).sounds(BlockSoundGroup.STONE); } public static FabricBlockSettings redstoneCampfireSettings() { return FabricBlockSettings - .of(Material.WOOD, MapColor.BROWN) + .copyOf(OAK_WOOD) .strength(2.0F) .sounds(BlockSoundGroup.WOOD) .luminance(createLightLevelFromLitBlockState(7)) @@ -40,7 +39,7 @@ public static FabricBlockSettings redstoneCampfireSettings() { public static LeavesBlock JinericLeavesBlock(BlockSoundGroup soundGroup) { return new LeavesBlock( - AbstractBlock.Settings.of(Material.LEAVES) + AbstractBlock.Settings.copy(OAK_LEAVES) .strength(0.2F) .ticksRandomly() .sounds(soundGroup) diff --git a/src/main/java/jingy/jineric/screen/RefineryScreen.java b/src/main/java/jingy/jineric/screen/RefineryScreen.java index 98777c94..56cd1bb3 100644 --- a/src/main/java/jingy/jineric/screen/RefineryScreen.java +++ b/src/main/java/jingy/jineric/screen/RefineryScreen.java @@ -3,8 +3,8 @@ import jingy.jineric.base.JinericMain; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.ingame.AbstractFurnaceScreen; -import net.minecraft.client.util.math.MatrixStack; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.text.Text; import net.minecraft.util.Identifier; @@ -18,7 +18,7 @@ public RefineryScreen(RefineryScreenHandler handler, PlayerInventory inventory, } @Override - public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { - super.render(matrices, mouseX, mouseY, delta); + public void render(DrawContext context, int mouseX, int mouseY, float delta) { + super.render(context, mouseX, mouseY, delta); } } diff --git a/src/main/java/jingy/jineric/screen/ShulkerChestScreen.java b/src/main/java/jingy/jineric/screen/ShulkerChestScreen.java index 3d9f5069..4d0fbfc7 100644 --- a/src/main/java/jingy/jineric/screen/ShulkerChestScreen.java +++ b/src/main/java/jingy/jineric/screen/ShulkerChestScreen.java @@ -3,9 +3,9 @@ import com.mojang.blaze3d.systems.RenderSystem; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.ingame.HandledScreen; import net.minecraft.client.render.GameRenderer; -import net.minecraft.client.util.math.MatrixStack; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.text.Text; import net.minecraft.util.Identifier; @@ -17,7 +17,6 @@ public class ShulkerChestScreen extends HandledScreen public ShulkerChestScreen(ShulkerChestScreenHandler handler, PlayerInventory inventory, Text title) { super(handler, inventory, title); - this.passEvents = false; this.backgroundWidth = 176; this.backgroundHeight = 276; this.playerInventoryTitleY = 182; @@ -26,19 +25,19 @@ public ShulkerChestScreen(ShulkerChestScreenHandler handler, PlayerInventory inv } @Override - public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { - this.renderBackground(matrices); - super.render(matrices, mouseX, mouseY, delta); - this.drawMouseoverTooltip(matrices, mouseX, mouseY); + public void render(DrawContext context, int mouseX, int mouseY, float delta) { + this.renderBackground(context); + super.render(context, mouseX, mouseY, delta); + this.drawMouseoverTooltip(context, mouseX, mouseY); } @Override - protected void drawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY) { + protected void drawBackground(DrawContext context, float delta, int mouseX, int mouseY) { RenderSystem.setShader(GameRenderer::getPositionTexProgram); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.setShaderTexture(0, TEXTURE); int x = (width - backgroundWidth) / 2; int y = (height - backgroundHeight) / 2; - drawTexture(matrices, x, y, 0, 0, this.backgroundWidth, this.backgroundHeight, 256, 320); + context.drawTexture(TEXTURE, x, y, 0, 0, this.backgroundWidth, this.backgroundHeight, 256, 320); } } diff --git a/src/main/resources/data/minecraft/tags/blocks/enchantment_power_provider.json b/src/main/resources/data/minecraft/tags/blocks/enchantment_power_provider.json new file mode 100644 index 00000000..a509d2a9 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/enchantment_power_provider.json @@ -0,0 +1,5 @@ +{ + "values": [ + "#jineric:wooden_bookshelves" + ] +} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 1baab4d2..3704eb8e 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -40,7 +40,7 @@ "depends": { "fabricloader": ">=0.14", "fabric": "*", - "minecraft": "~1.19.3", + "minecraft": ">1.19.3", "java": ">=17" }, "accessWidener": "jineric.accesswidener",