
DinoPawz
Members-
Posts
49 -
Joined
-
Last visited
Everything posted by DinoPawz
-
Is it still possible to detect within a custom mob class if it has been hit by an Uncraftable Tipped Arrow , and if so, how? I am trying to convert code from 1.12.2 to 1.18.2 but the capability no longer seems to exist. @Override public boolean hurt(DamageSource source, float amount) { Entity entity = source.getDirectEntity(); if (entity instanceof LivingEntity) { this.setTarget((LivingEntity) entity); if (entity instanceof Player) { if (amount > 0) { if (source.isProjectile()) { if (!this.hasPal()) { if( source.getImmediateSource() instanceof EntityTippedArrow) { TippedArrowItem tippedArrow = (TippedArrowItem) source.get.getImmediateSource(); if (tippedArrow.getColor()==3694022) {
-
Looks like I am supposed to register it somehow in @SubscribeEvent public static void registerLayerDefinition(@NotNull EntityRenderersEvent.RegisterLayerDefinitions event) {}
-
I got a log error. java.lang.IllegalArgumentException: No model for layer signexample:sign/jade#main 10:05:16.047 game at net.minecraft.client.renderer.blockentity.SignRenderer.m_173646_(SignRenderer.java:172) ~[client-1.19.2-20220805.130853-srg.jar%23147!/:?] {re:classloading}
-
This is log error: Caused by: com.google.gson.JsonParseException: Error loading registry data: No key feature in MapLike[{"type":"epictrees:epic_trees_codec","replace":false,"entries":[{"biomes":["minecraft:plains","minecraft:meadow"],"feature":"epictrees:weep_tree"},{"biomes":"minecraft:beach","feature":"epictrees:beach_palm"}],"forge:registry_name":"forge:biome_modifier"}]; No key biomes in MapLike[{"type":"epictrees:epic_trees_codec","replace":false,"entries":[{"biomes":["minecraft:plains","minecraft:meadow"],"feature":"epictrees:weep_tree"},{"biomes":"minecraft:beach","feature":"epictrees:beach_palm"}],"forge:registry_name":"forge:biome_modifier"}] This is my file located at data/epictrees/forge/biome_modifier/epic_trees_codec.json { "type":"epictrees:epic_trees_codec", "replace":false, "entries": [ { "biomes":["minecraft:plains","minecraft:meadow"], "feature":"epictrees:weep_tree" }, { "biomes":"minecraft:beach", "feature":"epictrees:beach_palm" } ],"forge:registry_name":"epictrees:epic_trees_codec" } And I get the same error with this code: { "type":"epictrees:epic_trees_codec", "replace":false, "entries": [ { "biomes":["minecraft:plains","minecraft:meadow"], "feature":"epictrees:weep_tree" }, { "biomes":"minecraft:beach", "feature":"epictrees:beach_palm" } ],"forge:registry_name":"forge:biome_modifier" } My main class: static DeferredRegister<Codec<? extends BiomeModifier>> BIOME_MODIFIER_SERIALIZERS = DeferredRegister.create(ForgeRegistries.Keys.BIOME_MODIFIER_SERIALIZERS, MODID); public static final RegistryObject<Codec<EpicTreesBiomeModifier>> EPIC_TREES_CODEC = BIOME_MODIFIER_SERIALIZERS.register("epic_trees_codec", () -> RecordCodecBuilder.create(builder -> builder.group( // declare fields Biome.LIST_CODEC.fieldOf("biomes").forGetter(EpicTreesBiomeModifier::biomes), PlacedFeature.CODEC.fieldOf("feature").forGetter(EpicTreesBiomeModifier::feature) // declare constructor ).apply(builder, EpicTreesBiomeModifier::new))); public EpicTrees() { final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); // Register the Deferred Register to the mod event bus so blocks get registered BLOCKS.register(modEventBus); // Register the Deferred Register to the mod event bus so items get registered ITEMS.register(modEventBus); BLOCK_ENTITIES.register(modEventBus); ModFeatures.register(modEventBus); BIOME_MODIFIER_SERIALIZERS.register(modEventBus); // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); //ModEntities.ENTITIES.register(modEventBus); //MinecraftForge.EVENT_BUS.register(WanderingArboristSpawner.class); //modEventBus.addListener(this::clientSetup); // Register the commonSetup method for modloading modEventBus.addListener(this::commonSetup); } public record EpicTreesBiomeModifier(HolderSet<Biome> biomes, Holder<PlacedFeature> feature) implements BiomeModifier { @Override public void modify(Holder<Biome> biome, Phase phase, ModifiableBiomeInfo.BiomeInfo.Builder builder) { if (phase == Phase.ADD && biomes.contains(biome)) { // add things to biomes builder.getGenerationSettings().addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, feature); } } @NotNull public Codec<? extends BiomeModifier> codec() { // This must return a registered Codec, see Biome Modifier Serializers below. return EpicTrees.EPIC_TREES_CODEC.get(); } } And I have printed out the names of the Deferred Register objects to confirm the feature names are specified correctly and each feature, configured feature and the placed feature versions are registered with the same name.
-
blah
-
I have configured all my features, and registered them as per shown. However, none of my features has ever been generated by in the world by the mc engine. I don't know if I have to do anything else, or something is wrong, or if mc is just too busy generating it's trees to bother with my stuff. public static final RegistryObject<Feature<NoneFeatureConfiguration>> WEEP_TREE = FEATURES.register("weep_tree", () -> new WeepingTreeFeature(NoneFeatureConfiguration.CODEC)); public static final RegistryObject<ConfiguredFeature<?, ?>> WEEP_TREE_CONFIGURED = CONFIGURED_FEATURES.register("weep_tree", () -> new ConfiguredFeature<>(WEEP_TREE.get(), NoneFeatureConfiguration.INSTANCE)); // Placement public static final RegistryObject<PlacedFeature> WEEPING_TREE_PLACED = PLACED_FEATURES.register("weep_tree", () -> new PlacedFeature(WEEP_TREE_CONFIGURED.getHolder().get(), List.of(NoiseBasedCountPlacement.of(73, 730D, 0.0D), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome()))); public static void register(IEventBus bus) { CONFIGURED_FEATURES.register(bus); PLACED_FEATURES.register(bus); FEATURES.register(bus); } public EpicTrees() { final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); BLOCKS.register(modEventBus); ITEMS.register(modEventBus); BLOCK_ENTITIES.register(modEventBus); MinecraftForge.EVENT_BUS.register(this); ModFeatures.register(modEventBus); modEventBus.addListener(this::commonSetup); }
-
My sign block entity still not rendering. I have put the pngs in the minecraft:textures directory and added the signs to the block tags. And yes, I needed another texture for the item sign. Mc loads and runs without any errors at all, even when I fail to place my sign. When I try to place it, the sign correctly built(texture applied to correct model), appears for a split second before it disappears, where ever I try to place it.
-
The problem might be that the build function below is passing a null value. I tried entering a Type there but it wants and expression which goes beyond trial and error debugging. I don't know what I should put there, if anything. public static final RegistryObject<BlockEntityType<SignBlockEntity>> CHERRY_SIGN_BLOCK_ENTITY = BLOCK_ENTITIES.register("cherry_sign_block_entity", () -> BlockEntityType.Builder.of(SignBlockEntity::new, CHERRY_WALL_SIGN.get(), CHERRY_STANDING_SIGN.get()).build(null));
-
public static final WoodType CHERRY_WOOD_TYPE = WoodType.create(new ResourceLocation(MODID, "cherry").toString()); public static final RegistryObject<ModStandingSignBlock> CHERRY_STANDING_SIGN = BLOCKS.register("cherry_sign", () -> new ModStandingSignBlock(BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.COLOR_PINK).noCollission().strength(1.0F).sound(SoundType.WOOD), CHERRY_WOOD_TYPE)); public static final RegistryObject<ModWallSignBlock> CHERRY_WALL_SIGN = BLOCKS.register("cherry_wall_sign", () -> new ModWallSignBlock(BlockBehaviour.Properties.of(Material.WOOD).noCollission().strength(1.0F).sound(SoundType.WOOD), CHERRY_WOOD_TYPE)); public static final RegistryObject<SignItem> CHERRY_SIGN = ITEMS.register("cherry_sign", () -> new SignItem((new Item.Properties()).stacksTo(16).tab(CreativeModeTab.TAB_DECORATIONS), CHERRY_STANDING_SIGN.get(), CHERRY_WALL_SIGN.get())); private static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, MODID); public static final RegistryObject<BlockEntityType<SignBlockEntity>> CHERRY_SIGN_BLOCK_ENTITY = BLOCK_ENTITIES.register("cherry_sign_block_entity", () -> BlockEntityType.Builder.of(SignBlockEntity::new, CHERRY_WALL_SIGN.get(), CHERRY_STANDING_SIGN.get()).build(null)); public EpicTrees() { final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); // Register the Deferred Register to the mod event bus so blocks get registered BLOCKS.register(modEventBus); // Register the Deferred Register to the mod event bus so items get registered ITEMS.register(modEventBus); BLOCK_ENTITIES.register(modEventBus); // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); //ModEntities.ENTITIES.register(modEventBus); ModFeatures.register(modEventBus); //MinecraftForge.EVENT_BUS.register(WanderingArboristSpawner.class); //modEventBus.addListener(this::clientSetup); // Register the commonSetup method for modloading modEventBus.addListener(this::commonSetup); } private void commonSetup(@NotNull final FMLCommonSetupEvent event) { // Some common setup code //LOGGER.info("HELLO FROM COMMON SETUP"); //LOGGER.info("DIRT BLOCK >> {}", ForgeRegistries.BLOCKS.getKey(Blocks.DIRT)); event.enqueueWork(() -> WoodType.register(CHERRY_WOOD_TYPE)); } // You can use SubscribeEvent and let the Event Bus discover methods to call // You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent @Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public static class ClientModEvents { @SubscribeEvent public static void onClientSetup(@NotNull FMLClientSetupEvent event) { // Some client setup code //LOGGER.info("HELLO FROM CLIENT SETUP"); //LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); /* event.enqueueWork(() -> { Atlases.addWoodType(CHERRY_WOOD_TYPE); */ } @SubscribeEvent public void onEntityRenderersEvent(@NotNull EntityRenderersEvent.RegisterRenderers event) { event.registerBlockEntityRenderer(CHERRY_SIGN_BLOCK_ENTITY.get(), SignRenderer::new); } } public class ModWallSignBlock extends WallSignBlock { public ModWallSignBlock(Properties p_58068_, WoodType p_58069_) { super(p_58068_, p_58069_); } } public class ModStandingSignBlock extends StandingSignBlock { public ModStandingSignBlock(Properties p_56990_, WoodType p_56991_) { super(p_56990_, p_56991_); } } ---- Minecraft Crash Report ---- // Don't be sad, have a hug! ❤️ Time: 2022-09-12 13:12:25 Description: Rendering screen java.lang.NullPointerException: Cannot invoke "net.minecraft.client.resources.model.Material.m_119194_(net.minecraft.client.renderer.MultiBufferSource, java.util.function.Function)" because "$$10" is null at net.minecraft.client.gui.screens.inventory.SignEditScreen.m_6305_(SignEditScreen.java:159) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading} at net.minecraftforge.client.ForgeHooksClient.drawScreenInternal(ForgeHooksClient.java:438) ~[forge-1.19.2-43.1.1-universal.jar%23151!/:?] {re:classloading} at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:431) ~[forge-1.19.2-43.1.1-universal.jar%23151!/:?] {re:classloading} at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:896) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1115) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:700) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:runtimedistcleaner:A} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {} at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {} at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {} at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.1.1.jar%2395!/:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at net.minecraft.client.gui.screens.inventory.SignEditScreen.m_6305_(SignEditScreen.java:159) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading} at net.minecraftforge.client.ForgeHooksClient.drawScreenInternal(ForgeHooksClient.java:438) ~[forge-1.19.2-43.1.1-universal.jar%23151!/:?] {re:classloading} at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:431) ~[forge-1.19.2-43.1.1-universal.jar%23151!/:?] {re:classloading} -- Screen render details -- Details: Screen name: net.minecraft.client.gui.screens.inventory.SignEditScreen Mouse location: Scaled: (213, 120). Absolute: (427.000000, 240.000000) Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2.000000 Stacktrace: at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:896) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1115) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:700) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:runtimedistcleaner:A} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {} at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {} at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {} at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.1.1.jar%2395!/:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {} -- Affected level -- Details: All players: 1 total; [LocalPlayer['InstantMilo'/201, l='ClientLevel', x=-2.76, y=80.00, z=34.46]] Chunk stats: 961, 576 Level dimension: minecraft:overworld Level spawn location: World: (0,86,32), Section: (at 0,6,0 in 0,5,2; chunk contains blocks 0,-64,32 to 15,319,47), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,-64,0 to 511,319,511) Level time: 465 game time, 465 day time Server brand: forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.ClientLevel.m_6026_(ClientLevel.java:450) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.m_91354_(Minecraft.java:2278) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:717) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,pl:runtimedistcleaner:A} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {} at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {} at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {} at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.1.1.jar%2395!/:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2382!/:?] {} at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {} -- Last reload -- Details: Reload number: 1 Reload reason: initial Finished: Yes Packs: Default, Mod Resources -- System Details -- Details: Minecraft Version: 1.19.2 Minecraft Version ID: 1.19.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 17.0.3, Microsoft Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft Memory: 797535704 bytes (760 MiB) / 1811939328 bytes (1728 MiB) up to 4294967296 bytes (4096 MiB) CPUs: 8 Processor Vendor: AuthenticAMD Processor Name: AMD Ryzen 5 2400G with Radeon Vega Graphics Identifier: AuthenticAMD Family 23 Model 17 Stepping 0 Microarchitecture: Zen Frequency (GHz): 3.59 Number of physical packages: 1 Number of physical CPUs: 4 Number of logical CPUs: 8 Graphics card #0 name: NVIDIA GeForce GTX 1050 Ti Graphics card #0 vendor: NVIDIA (0x10de) Graphics card #0 VRAM (MB): 4095.00 Graphics card #0 deviceId: 0x1c82 Graphics card #0 versionInfo: DriverVersion=31.0.15.1659 Graphics card #1 name: AMD Radeon(TM) RX Vega 11 Graphics Graphics card #1 vendor: Advanced Micro Devices, Inc. (0x1002) Graphics card #1 VRAM (MB): 2048.00 Graphics card #1 deviceId: 0x15dd Graphics card #1 versionInfo: DriverVersion=30.0.13014.8 Memory slot #0 capacity (MB): 8192.00 Memory slot #0 clockSpeed (GHz): 2.67 Memory slot #0 type: DDR4 Memory slot #1 capacity (MB): 8192.00 Memory slot #1 clockSpeed (GHz): 2.67 Memory slot #1 type: DDR4 Virtual memory max (MB): 29060.46 Virtual memory used (MB): 21966.76 Swap memory total (MB): 14792.35 Swap memory used (MB): 1293.00 JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx4G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M Launched Version: 1.19.2-forge-43.1.1 Backend library: LWJGL version 3.3.1 build 7 Backend API: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 GL version 3.2.0 NVIDIA 516.59, NVIDIA Corporation Window size: 854x480 GL Caps: Using framebuffer using OpenGL 3.2 GL debug messages: Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'forge'; Server brand changed to 'forge' Type: Integrated Server (map_client.txt) Graphics mode: fancy Resource Packs: vanilla, mod_resources Current Language: English (US) CPU: 8x AMD Ryzen 5 2400G with Radeon Vega Graphics Server Running: true Player Count: 1 / 8; [ServerPlayer['InstantMilo'/201, l='ServerLevel[New World]', x=-2.76, y=80.00, z=34.46]] Data Packs: vanilla, mod:forge, mod:epictrees World Generation: Stable ModLauncher: 10.0.8+10.0.8+main.0ef7e830 ModLauncher launch target: forgeclient ModLauncher naming: srg ModLauncher services: mixin-0.8.5.jar mixin PLUGINSERVICE eventbus-6.0.3.jar eventbus PLUGINSERVICE fmlloader-1.19.2-43.1.1.jar slf4jfixer PLUGINSERVICE fmlloader-1.19.2-43.1.1.jar object_holder_definalize PLUGINSERVICE fmlloader-1.19.2-43.1.1.jar runtime_enum_extender PLUGINSERVICE fmlloader-1.19.2-43.1.1.jar capability_token_subclass PLUGINSERVICE accesstransformers-8.0.4.jar accesstransformer PLUGINSERVICE fmlloader-1.19.2-43.1.1.jar runtimedistcleaner PLUGINSERVICE modlauncher-10.0.8.jar mixin TRANSFORMATIONSERVICE modlauncher-10.0.8.jar fml TRANSFORMATIONSERVICE FML Language Providers: [email protected] lowcodefml@null javafml@null Mod List: client-1.19.2-20220805.130853-srg.jar |Minecraft |minecraft |1.19.2 |DONE |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f forge-1.19.2-43.1.1-universal.jar |Forge |forge |43.1.1 |DONE |Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90 epictrees-1.0.0.jar |Epic Trees |epictrees |1.0.0 |DONE |Manifest: NOSIGNATURE Crash Report UUID: d69f839f-9cf9-4d20-9cca-c9548a290efb FML: 43.1 Forge: net.minecraftforge:43.1.1
-
I followed the 1.16 tutorial to create and register my sign. However, the code doesn't work for 1.19.2 and I cannot find out how to render it properly. I cannot figure the new way of doing this: ClientRegistry.bindTileEntityRenderer(CUSTOM_SIGN.get(), SignTileEntityRenderer::new); Atlases.addWoodType(TEST_WOOD_TYPE); My sign is created in-game with no errors, but it appears as the flat texture in inventory and in my hand instead of being wrapped around the model, and when I try to place it, it appears as an invisible sign and the game crashes.
-
Well, the information is not willingly given if we have to unzip their jar file. Intellij gives us all the 1.19.2 minecraft java code, but why not the minecraft assets anymore?
-
I cannot find the mc 1.19.2 assets anywhere so I have no clues to models or blockstates. However, the minecraft log helps us generate our blockstate files. But we appear to be completely in the dark when it comes to using the minecraft models. I have successfully made planks, logs, leaves, pressure plates, buttons, but am unable to make potted saplings, trapdoors, fence gates, doors, slabs, etc, because the minecraft models have changed since 1.12. Does minecraft wants us to create and use our own models instead of theirs? If so, why does the output file help us create the blockstate files? Do they read this and respond, oh someone can use some of our models, quick we had better change them so they cannot. Minecraft is so changing stuff for the sake of changing it, changing pos.up and pos.down to pos.above and pos.below is a prime example of that. They just don't appear to support modded minecraft.
-
Planted sapling renders with black outline MC 1.19.2
DinoPawz replied to DinoPawz's topic in Modder Support
Need to add "render_type": "minecraft:cutout" to Model file -
Planted sapling renders with black outline MC 1.19.2
DinoPawz replied to DinoPawz's topic in Modder Support
Model file: { "parent": "block/cross", "textures": { "cross": "epictrees:blocks/cherry_sapling" } } -
When I view my sapling in Inventory and hand it renders fine. However, when I plant it, the texture is rendered and crossed as a full block, rendering the empty part of sapling texture as black. public static final RegistryObject<Block> CHERRY_SAPLING_BLOCK = BLOCKS.register("cherry_sapling", () -> new TreeSaplingBlock(TreeVar.CHERRY, new WorldGenTrees(TreeVar.CHERRY), BlockBehaviour.Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.GRASS).requiresCorrectToolForDrops().strength(1.5F, 6.0F))); I have tried the property dynamicShape with no success. I have extended the SaplingBlock class. In that class: public @NotNull VoxelShape getBlockSupportShape(@NotNull BlockState p_54456_, @NotNull BlockGetter p_54457_, @NotNull BlockPos p_54458_) { return Shapes.empty(); } which doesn't work and is now commented out as deprecated. My sapling works fine. How do I fix the rendering issue please?
-
I have created leaves using the Block class as the LeavesBlock and BushBlock classes do not suit my purpose. In my class I have public @NotNull VoxelShape getBlockSupportShape(@NotNull BlockState p_54456_, @NotNull BlockGetter p_54457_, @NotNull BlockPos p_54458_) { return Shapes.empty(); } However, it gets commented out as deprecated and it fails to render the block as empty and the texture with holes. Is it possible to do, and if so, how please.
-
Use the Minecraft Launcher to create a new installation and run vanilla Minecraft 1.12.2 first at least up till you get game loaded screen. Then exit out, and edit the game configuration to run Forge 1.12.2. Then run that until you get to the game loaded screen. Then you can exit out of the Launcher and add mods to the mod directory that forge created for you in the working directory.
-
RenderFile: public class RenderLegendaryMalzahar<T extends Mob, M extends HumanoidModel<T>> extends MobRenderer<T, M> { private static final ResourceLocation TEXTURE = new ResourceLocation(AncientFruitTrees.MODID, "textures/model/legendary/malzahar_a.png"); public RenderLegendaryMalzahar(EntityRendererProvider.Context p_174169_, M p_174170_, float p_174171_) { this(p_174169_, p_174170_, p_174171_, 1.0F, 1.0F, 1.0F); } public RenderLegendaryMalzahar(EntityRendererProvider.Context p_174173_, M p_174174_, float p_174175_, float p_174176_, float p_174177_, float p_174178_) { super(p_174173_, p_174174_, p_174175_); this.addLayer(new CustomHeadLayer(this, p_174173_.getModelSet(), p_174176_, p_174177_, p_174178_)); this.addLayer(new ElytraLayer(this, p_174173_.getModelSet())); this.addLayer(new ItemInHandLayer(this)); } @Nonnull public ResourceLocation getTextureLocation(@Nonnull T p_114891_) { return TEXTURE; } This part doesn't work, cos RenderFactory does not seem to exist and neither does RenderingRegistry, and the model class above does not provide an constructor with no params. public class ModRenderRegistry { public static void registryEntityRenderers() { RegistryObject.of(LegendaryMalzahar.class, new RenderLegendaryMalzahar()); RegistryObject.of(WowLichKing.class, new RenderWowLichKing()); } }
-
I have created a new Project in Intellij targeting 1.17.1 and updated Intellij to the latest version. Updating Intelli has broken all of my current mods. However, when I try to build the latest 1.17.1 project I get this error: java: invalid source release: 14. I think has something to do with the gradle version being 6.3 and wanting to be 6.8.1 and this setting in the build.gradle file. classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true in the gradle So, how do update the gradle wrapper version from here on a Windows 10 device.
-
Thanks, working now. Just needed to move some code from tick to onCollideWithPlayer.
-
Forge 1.14.4-28.1.0 When registering my living entity i have set the tracking range to 128 and I have set the sharedMonsterAttribute.FollowRange to the same figure. But I use the following code, it only detects a player if the player is within 16 blocks of the mob, not 128.. this.getAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(128); .setTrackingRange(128) PlayerEntity player = world.getClosestPlayer(this.posX, this.posY, this.posZ, 128, false); PlayerEntity revenge = world.getPlayerByUuid(this.getRevengeUuid()); I use the same functions in 1.12.2 and it works fine. Regarding 1.14.4, am I doing something wrong, or is 16 the max detection range?
-
Hi, I have a loot table. It checks out to be valid json and it runs fine without the problem code below: { "type": "item", "name": "minecraft:wool", "weight": 15, "functions": [ { "function": "minecraft:set_data", "data": 0 }, { "function": "minecraft:set_count", "count": { "min": 1, "max": 5 } } ] } I followed the tutorial here: https://github.com/skylinerw/guides/blob/master/java/loot tables.md The error message in the log file: [18:50:27] [Server thread/ERROR] [minecraft/LootTableManager]: Couldn't load loot table oreberriesgalore:king_den_loot_table from file:/C:/Users/dino/IdeaProjects/Oreberries-1.12.2/classes/production/Oreberries-1.12.2.main/assets/oreberriesgalore/loot_tables/king_den_loot_table.json com.google.gson.JsonSyntaxException: Missing entries at net.minecraft.util.JsonUtils.deserializeClass(JsonUtils.java:375) ~[JsonUtils.class:?] at net.minecraft.world.storage.loot.LootPool$Serializer.deserialize(LootPool.java:153) ~[LootPool$Serializer.class:?] at net.minecraft.world.storage.loot.LootPool$Serializer.deserialize(LootPool.java:147) ~[LootPool$Serializer.class:?] at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) ~[TreeTypeAdapter.class:?] at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) ~[TypeAdapterRuntimeTypeWrapper.class:?] at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72) ~[ArrayTypeAdapter.class:?] at com.google.gson.Gson.fromJson(Gson.java:887) ~[Gson.class:?] at com.google.gson.Gson.fromJson(Gson.java:952) ~[Gson.class:?] at com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:162) ~[TreeTypeAdapter$GsonContextImpl.class:?] at net.minecraft.util.JsonUtils.deserializeClass(JsonUtils.java:359) ~[JsonUtils.class:?] at net.minecraft.util.JsonUtils.deserializeClass(JsonUtils.java:381) ~[JsonUtils.class:?] at net.minecraft.world.storage.loot.LootTable$Serializer.deserialize(LootTable.java:210) ~[LootTable$Serializer.class:?] at net.minecraft.world.storage.loot.LootTable$Serializer.deserialize(LootTable.java:205) ~[LootTable$Serializer.class:?] at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) ~[TreeTypeAdapter.class:?] at com.google.gson.Gson.fromJson(Gson.java:887) ~[Gson.class:?] at com.google.gson.Gson.fromJson(Gson.java:852) ~[Gson.class:?] at com.google.gson.Gson.fromJson(Gson.java:801) ~[Gson.class:?] at com.google.gson.Gson.fromJson(Gson.java:773) ~[Gson.class:?] at net.minecraftforge.common.ForgeHooks.loadLootTable(ForgeHooks.java:1163) ~[ForgeHooks.class:?] at net.minecraft.world.storage.loot.LootTableManager$Loader.loadBuiltinLootTable(LootTableManager.java:156) [LootTableManager$Loader.class:?] at net.minecraft.world.storage.loot.LootTableManager$Loader.load(LootTableManager.java:72) [LootTableManager$Loader.class:?] at net.minecraft.world.storage.loot.LootTableManager$Loader.load(LootTableManager.java:53) [LootTableManager$Loader.class:?] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211) [guava-21.0.jar:?] at com.google.common.cache.LocalCache.get(LocalCache.java:4154) [guava-21.0.jar:?] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) [guava-21.0.jar:?] at net.minecraft.world.storage.loot.LootTableManager.getLootTableFromLocation(LootTableManager.java:40) [LootTableManager.class:?] at net.minecraft.world.storage.loot.LootTableManager.reloadLootTables(LootTableManager.java:49) [LootTableManager.class:?] at net.minecraft.world.storage.loot.LootTableManager.<init>(LootTableManager.java:35) [LootTableManager.class:?] at net.minecraft.world.WorldServer.init(WorldServer.java:161) [WorldServer.class:?] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:123) [IntegratedServer.class:?] at net.minecraft.server.integrated.IntegratedServer.init(IntegratedServer.java:160) [IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:552) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
-
[1.12.2] How to remove potion from player delivered from block
DinoPawz replied to DinoPawz's topic in Modder Support
doh, thank you -
Hi, Forge 1.12.2-14.23.5.2768 I am trying to set and remove a potion from a block. Block does not have an update function, so I have implemented ITickable. public class LeadBlock extends Block implements ITickable { private static Map<EntityPlayer, PotionEffect> potionEffects = new HashMap<>(); LeadBlock(@Nonnull String name, @Nonnull MaterialVariant materialVariant) { super(Material.IRON); setRegistryName(Reference.MODID, name); setUnlocalizedName(Reference.MODID_PREFIX + name); setHarvestLevel("pickaxe", 2); setHardness(materialVariant.getHardness()); setResistance(materialVariant.getResistance()); setCreativeTab(Tab.METALS); setSoundType(SoundType.METAL); this.setDefaultState(this.blockState.getBaseState()); } @Override public void onEntityCollidedWithBlock(@Nonnull World worldIn, BlockPos pos, IBlockState state, Entity entityIn) { if (worldIn.isRemote) { if (entityIn instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer)entityIn; PotionEffect potionEffect = new PotionEffect(MobEffects.POISON, 300, 10, true, true); player.addPotionEffect(potionEffect); potionEffects.put(player, potionEffect); } } super.onEntityCollidedWithBlock(worldIn, pos, state, entityIn); } @Override public void onEntityWalk(@Nonnull World worldIn, BlockPos pos, Entity entityIn) { if (worldIn.isRemote) { if (entityIn instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer)entityIn; PotionEffect potionEffect = new PotionEffect(MobEffects.POISON, 600, 20, true, true); player.addPotionEffect(potionEffect); potionEffects.put(player, potionEffect); } } super.onEntityWalk(worldIn, pos, entityIn); } @Override public void update() { OreberriesGalore.LOGGER.warn("In LeadBlock.update"); if (!potionEffects.isEmpty()) { OreberriesGalore.LOGGER.warn("In LeadBlock.update potionEffect map has an entry"); for (Map.Entry<EntityPlayer, PotionEffect> entry : potionEffects.entrySet()) { EntityPlayer player = entry.getKey(); if (player != null) { OreberriesGalore.LOGGER.warn("In LeadBlock.update potionEffect found player"); if (!player.isPotionActive(entry.getValue().getPotion())) { OreberriesGalore.LOGGER.warn("In LeadBlock.update potionEffect about to remove potion effect from player"); player.removePotionEffect(entry.getValue().getPotion()); potionEffects.remove(entry.getKey(), entry.getValue()); } } } } } } The potion effect status bar gets activated correctly, and the potion effect counts down correctly, and the player's health hearts render green correctly. However, the player suffers no physical ill effects. And when the potion effect has finished, the status bars remain active until logging out, as do the player's health hearts remain green. The update function does not run as there is no output to the log file from this class.