Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.13.2] Vanilla block replacement
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 4
Pyre540

[1.13.2] Vanilla block replacement

By Pyre540, June 1, 2019 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Pyre540    0

Pyre540

Pyre540    0

  • Tree Puncher
  • Pyre540
  • Members
  • 0
  • 14 posts
Posted June 1, 2019

Hey,

What is the correct way to replace vanila blocks in forge 1.13.2?

I tried to register my block with vanilla registry name (similar to what I was doing in 1.12.2) but unfortunately it didn't work (stacktrace below).

 

My block:

Spoiler

package pyre.blockenlightenment.block;

import net.minecraft.block.Block;
import net.minecraft.block.BlockGlass;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.EnumFacing;

public class BlockCustomGlass extends BlockGlass {

    public BlockCustomGlass() {
        super(Block.Properties.create(Material.GLASS).hardnessAndResistance(0.3F).sound(SoundType.GLASS));
    }

    @Override
    public boolean isSideInvisible(IBlockState state, IBlockState adjacentBlockState, EnumFacing side) {

        if (adjacentBlockState.getBlock() instanceof BlockCutoutEnlightenedBlock) {
            //do something
        }
        return super.isSideInvisible(state, adjacentBlockState, side);
    }
}

 

 

Registering of block:

Spoiler

@Mod.EventBusSubscriber(modid = Reference.MOD_ID, bus = Bus.MOD)
public class RegistryHandler {

    @SubscribeEvent
    public static void onBlockRegister(final RegistryEvent.Register<Block> event) {
        event.getRegistry().register(new BlockCustomGlass().setRegistryName(new ResourceLocation("minecraft", "glass")));
    }
}

 

 

Latest.log

Spoiler

[01cze2019 21:42:34.355] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20190213.203750, --fml.mcVersion, 1.13.2, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 25.0.202, --version, MOD_DEV, --assetIndex, 1.13.1, --assetsDir, C:\Users\kamil\.gradle\caches\forge_gradle\assets, --username, Dev, --accessToken, ❄❄❄❄❄❄❄❄, --userProperties, {}]
[01cze2019 21:42:34.358] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher starting: java version 1.8.0_181
[01cze2019 21:42:34.641] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
[01cze2019 21:42:35.054] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmluserdevclient' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, C:\Users\kamil\.gradle\caches\forge_gradle\assets, --assetIndex, 1.13.1, --username, Dev, --accessToken, ❄❄❄❄❄❄❄❄, --userProperties, {}]
[01cze2019 21:42:36.406] [Client thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: Dev
[01cze2019 21:42:41.262] [Client thread/WARN] [net.minecraft.client.GameSettings/]: Skipping bad option: lastServer:
[01cze2019 21:42:41.277] [Client thread/INFO] [net.minecraft.client.Minecraft/]: LWJGL Version: 3.1.6 build 14
[01cze2019 21:42:42.608] [Client thread/INFO] [net.minecraftforge.fml.ModLoader/CORE]: Loading Network data for FML net version: FML2
[01cze2019 21:42:42.654] [modloading-worker-2/INFO] [net.minecraftforge.common.ForgeMod/FORGEMOD]: Forge mod loading, version 25.0.219, for MC 1.13.2 with MCP 20190213.203750
[01cze2019 21:42:42.654] [modloading-worker-2/INFO] [net.minecraftforge.common.MinecraftForge/FORGE]: MinecraftForge v25.0.219 Initialized
[01cze2019 21:42:45.504] [Client thread/INFO] [net.minecraftforge.registries.GameData/]: Potentially Dangerous alternative prefix `minecraft` for name `glass`, expected `blockenlightenment`. This could be a intended override, but in most cases indicates a broken mod.
[01cze2019 21:42:45.509] [Client thread/ERROR] [net.minecraftforge.registries.GameData/REGISTRIES]: Registry replacements for vanilla block 'minecraft:glass' must not change the number or order of blockstates.
	Old: 
	New: 
[01cze2019 21:42:45.509] [Client thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/]: Exception caught during firing event: Invalid vanilla replacement. See log for details.
	Index: 1
	Listeners:
		0: NORMAL
		1: ASM: class pyre.blockenlightenment.util.handler.RegistryHandler onBlockRegister(Lnet/minecraftforge/event/RegistryEvent$Register;)V
		2: ASM: class pyre.blockenlightenment.util.handler.RegistryHandler registerTileEntities(Lnet/minecraftforge/event/RegistryEvent$Register;)V
java.lang.RuntimeException: Invalid vanilla replacement. See log for details.
	at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:342)
	at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:306)
	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:368)
	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:300)
	at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:125)
	at pyre.blockenlightenment.util.handler.RegistryHandler.onBlockRegister(RegistryHandler.java:22)
	at net.minecraftforge.eventbus.ASMEventHandler_4_RegistryHandler_onBlockRegister_Register.invoke(.dynamic)
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:80)
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:254)
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.fireEvent(FMLModContainer.java:105)
	at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65)
	at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65)
	at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:111)
	at net.minecraftforge.fml.ModList.lambda$dispatchSynchronousEvent$4(ModList.java:111)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at net.minecraftforge.fml.ModList.dispatchSynchronousEvent(ModList.java:111)
	at net.minecraftforge.fml.ModList.lambda$static$0(ModList.java:82)
	at net.minecraftforge.fml.LifecycleEventProvider.dispatch(LifecycleEventProvider.java:70)
	at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:153)
	at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:891)
	at net.minecraftforge.fml.ModLoader.loadMods(ModLoader.java:141)
	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:63)
	at net.minecraft.client.Minecraft.init(Minecraft.java:412)
	at net.minecraft.client.Minecraft.run(Minecraft.java:345)
	at net.minecraft.client.main.Main.main(SourceFile:144)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:19)
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:32)
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:50)
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:59)
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:44)
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:98)

[01cze2019 21:42:45.511] [Client thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Caught exception during event RegistryEvent.Register<minecraft:blocks> dispatch for modid blockenlightenment
java.lang.RuntimeException: Invalid vanilla replacement. See log for details.
	at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:342) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:306) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:368) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:300) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:125) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at pyre.blockenlightenment.util.handler.RegistryHandler.onBlockRegister(RegistryHandler.java:22) ~[classes/:?]
	at net.minecraftforge.eventbus.ASMEventHandler_4_RegistryHandler_onBlockRegister_Register.invoke(.dynamic) ~[?:?]
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:80) ~[eventbus-0.9.2-service.jar:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:254) ~[eventbus-0.9.2-service.jar:?]
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.fireEvent(FMLModContainer.java:105) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:25.0]
	at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_181]
	at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_181]
	at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:111) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraftforge.fml.ModList.lambda$dispatchSynchronousEvent$4(ModList.java:111) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at java.util.ArrayList.forEach(ArrayList.java:1257) ~[?:1.8.0_181]
	at net.minecraftforge.fml.ModList.dispatchSynchronousEvent(ModList.java:111) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraftforge.fml.ModList.lambda$static$0(ModList.java:82) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraftforge.fml.LifecycleEventProvider.dispatch(LifecycleEventProvider.java:70) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:153) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:891) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraftforge.fml.ModLoader.loadMods(ModLoader.java:141) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:63) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:412) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:345) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraft.client.main.Main.main(SourceFile:144) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:19) [modlauncher-2.1.1.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:32) [modlauncher-2.1.1.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:50) [modlauncher-2.1.1.jar:?]
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:59) [modlauncher-2.1.1.jar:?]
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:44) [modlauncher-2.1.1.jar:?]
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:98) [forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
[01cze2019 21:42:45.526] [Client thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event LOAD_REGISTRIES, 1 errors found
[01cze2019 21:42:45.526] [Client thread/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted.
java.lang.Exception: stacktrace
	at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:274) ~[eventbus-0.9.2-service.jar:?]
	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:65) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:412) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:345) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraft.client.main.Main.main(SourceFile:144) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:19) [modlauncher-2.1.1.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:32) [modlauncher-2.1.1.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:50) [modlauncher-2.1.1.jar:?]
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:59) [modlauncher-2.1.1.jar:?]
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:44) [modlauncher-2.1.1.jar:?]
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:98) [forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
[01cze2019 21:42:45.547] [Client thread/INFO] [net.minecraft.resources.SimpleReloadableResourceManager/]: Reloading ResourceManager: main, forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar, Default
[01cze2019 21:42:46.918] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager/]: Starting up SoundSystem version 201809301515...
[01cze2019 21:42:47.130] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager/]: Initializing No Sound
[01cze2019 21:42:47.130] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager/]: (Silent Mode)
[01cze2019 21:42:47.193] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager/]: OpenAL initialized.
[01cze2019 21:42:47.520] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager/SOUNDS]: Preloading sound minecraft:sounds/ambient/underwater/underwater_ambience.ogg
[01cze2019 21:42:47.521] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager/SOUNDS]: Sound engine started
[01cze2019 21:42:52.616] [Client thread/INFO] [net.minecraft.client.renderer.texture.TextureMap/]: Max texture size: 16384
[01cze2019 21:42:55.158] [Client thread/INFO] [net.minecraft.client.renderer.texture.TextureMap/]: Created: 512x512 textures-atlas
[01cze2019 21:42:57.551] [Client thread/ERROR] [net.minecraftforge.fml.ModLoader/LOADING]: Skipping lifecycle event ENQUEUE_IMC, 1 errors found.
[01cze2019 21:42:57.551] [Client thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event ENQUEUE_IMC, 1 errors found
[01cze2019 21:42:57.551] [Client thread/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted.
java.lang.Exception: stacktrace
	at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:274) ~[eventbus-0.9.2-service.jar:?]
	at net.minecraftforge.fml.client.ClientModLoader.end(ClientModLoader.java:76) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:479) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:345) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at net.minecraft.client.main.Main.main(SourceFile:144) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:19) [modlauncher-2.1.1.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:32) [modlauncher-2.1.1.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:50) [modlauncher-2.1.1.jar:?]
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:59) [modlauncher-2.1.1.jar:?]
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:44) [modlauncher-2.1.1.jar:?]
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:98) [forge-1.13.2-25.0.219_mapped_snapshot_20190512-1.13.2.jar:?]
[01cze2019 21:42:57.552] [Client thread/WARN] [net.minecraft.client.GameSettings/]: Skipping bad option: lastServer:
[01cze2019 21:42:57.594] [Client thread/INFO] [com.mojang.text2speech.NarratorWindows/]: Narrator library for x64 successfully loaded
[01cze2019 21:42:58.445] [Realms Notification Availability checker #1/INFO] [com.mojang.realmsclient.client.RealmsClient/]: Could not authorize you against Realms server: Invalid session id

 

 

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7695

diesieben07

diesieben07    7695

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7695
  • 56361 posts
Posted June 1, 2019
8 minutes ago, Pyre540 said:

[01cze2019 21:42:45.509] [Client thread/ERROR] [net.minecraftforge.registries.GameData/REGISTRIES]: Registry replacements for vanilla block 'minecraft:glass' must not change the number or order of blockstates.

 

  • Quote

Share this post


Link to post
Share on other sites

Pyre540    0

Pyre540

Pyre540    0

  • Tree Puncher
  • Pyre540
  • Members
  • 0
  • 14 posts
Posted June 1, 2019

Ok so I checked what exactly is going on using debugger and found out that there is validStates mismatch (screen below):

- valid state for BlockGlass is apparently Block{minecraft:air}

- valid state for my block is Block{minecraft:glass}

 

Any idea why is that?

I also tried to register original glass block to check if that will change something but the effect is the same.

event.getRegistry().register(new BlockGlass(Block.Properties.create(Material.GLASS).hardnessAndResistance(0.3F).sound(SoundType.GLASS)).setRegistryName(new ResourceLocation("minecraft", "glass")));

 

Screen:

Spoiler

SF3PD8C.png

 

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7695

diesieben07

diesieben07    7695

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7695
  • 56361 posts
Posted June 2, 2019

Maybe it's a bug. Are you on the latest version of Forge?

Maybe you should report this on Github.

  • Quote

Share this post


Link to post
Share on other sites

Pyre540    0

Pyre540

Pyre540    0

  • Tree Puncher
  • Pyre540
  • Members
  • 0
  • 14 posts
Posted June 2, 2019

Yup, I'm using Forge 1.13.2 - 25.0.219

  • Quote

Share this post


Link to post
Share on other sites

mooviies    0

mooviies

mooviies    0

  • Tree Puncher
  • mooviies
  • Members
  • 0
  • 10 posts
Posted September 5, 2019

Did you find a solution for that problem? I have the same problem even if the number and order of states are matching. I also tried doing it with the exact same block that minecraft use to register it.

 

Registration

registry.registerAll(
                new BlockLog(MaterialColor.WOOD, Block.Properties.create(Material.WOOD, MaterialColor.OBSIDIAN).hardnessAndResistance(2.0F).sound(SoundType.WOOD)).setRegistryName("minecraft:oak_log")
        );

 

Error

Quote

[05Sep2019 10:39:44.482] [Client thread/ERROR] [net.minecraftforge.registries.GameData/REGISTRIES]: Registry replacements for vanilla block 'minecraft:oak_log' must not change the number or order of blockstates.
    Old: axis={x,y,z}
    New: axis={x,y,z}

 

The Old and New are the exact same thing... 

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7695

diesieben07

diesieben07    7695

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7695
  • 56361 posts
Posted September 5, 2019

Show your block class.

  • Quote

Share this post


Link to post
Share on other sites

mooviies    0

mooviies

mooviies    0

  • Tree Puncher
  • mooviies
  • Members
  • 0
  • 10 posts
Posted September 5, 2019

I used BlockLog which is the class used by Minecraft. I didn't change a thing to test it and make sure it works fine.

 

However, I tested the same thing in 1.14.4 and it works fine. So I'm pretty sure it's a bug in the 1.13.2 version of forge.

 

 

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7695

diesieben07

diesieben07    7695

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7695
  • 56361 posts
Posted September 5, 2019

1.13.2 was very much a buggy in-between version. Use 1.14.4.

  • Quote

Share this post


Link to post
Share on other sites

mooviies    0

mooviies

mooviies    0

  • Tree Puncher
  • mooviies
  • Members
  • 0
  • 10 posts
Posted September 5, 2019

Yeah that's what I'll do. Looks more stable. Thanks :)

  • Quote

Share this post


Link to post
Share on other sites

JimiIT92    20

JimiIT92

JimiIT92    20

  • Dragon Slayer
  • JimiIT92
  • Members
  • 20
  • 745 posts
Posted February 18, 2020

I tried this in 1.15.2, but I get the same result as the first post. I can't change a vanilla block property. For example, I created a waterloggable door class
 

package com.lavalogged.blocks;

import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.DoorBlock;
import net.minecraft.block.IWaterLoggable;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import net.minecraft.fluid.IFluidState;
import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.state.properties.DoorHingeSide;
import net.minecraft.state.properties.DoubleBlockHalf;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;

/**
 * @author JimiIT92
 */
public class WaterLoggableDoorBlock extends DoorBlock implements IWaterLoggable {

    public WaterLoggableDoorBlock(Properties builder) {
        super(builder);
        this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH).with(OPEN, false).with(HINGE, DoorHingeSide.LEFT).with(POWERED, false).with(HALF, DoubleBlockHalf.LOWER).with(BlockStateProperties.WATERLOGGED, true));
    }

    protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
        builder.add(HALF, FACING, OPEN, HINGE, POWERED, BlockStateProperties.WATERLOGGED);
    }

    public IFluidState getFluidState(BlockState state) {
        return Fluids.WATER.getStillFluidState(false);
    }

    public boolean receiveFluid(IWorld worldIn, BlockPos pos, BlockState state, IFluidState fluidStateIn) {
        return IWaterLoggable.super.receiveFluid(worldIn, pos, state, fluidStateIn);
    }

    public boolean canContainFluid(IBlockReader worldIn, BlockPos pos, BlockState state, Fluid fluidIn) {
        return true;
    }

    @Deprecated
    public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos) {
        if (!stateIn.get(BlockStateProperties.WATERLOGGED)) {
            this.receiveFluid(worldIn, currentPos, stateIn, Fluids.WATER.getStillFluidState(false));
        }
        worldIn.getPendingFluidTicks().scheduleTick(currentPos, Fluids.WATER, Fluids.WATER.getTickRate(worldIn));
        return super.updatePostPlacement(stateIn, facing, facingState, worldIn, currentPos, facingPos);
    }

    public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
        return VoxelShapes.empty();
    }

    public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
        worldIn.getPendingFluidTicks().scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickRate(worldIn));
    }

    public Fluid pickupFluid(IWorld worldIn, BlockPos pos, BlockState state) {
        return Fluids.EMPTY;
    }
}

 

And then register with this
 

blockRegistryEvent.getRegistry().register(new WaterLoggableDoorBlock(Block.Properties.from(Blocks.OAK_DOOR))
                .setRegistryName(new ResourceLocation("minecraft", "oak_door")));


But the log says this
 

Registry replacements for vanilla block 'minecraft:oak_door' must not change the number or order of blockstates.
	Old: facing={north,south,west,east};half={upper,lower};hinge={left,right};open={true,false};powered={true,false}
	New: facing={north,south,west,east};half={upper,lower};hinge={left,right};open={true,false};powered={true,false};waterlogged={true,false}

 

So if we can't change or add properties to vanilla blocks like this, how can we do this?

  • Quote

Don't blame me if i always ask for your help. I just want to learn to be better :)

Share this post


Link to post
Share on other sites

Draco18s    2414

Draco18s

Draco18s    2414

  • Reality Controller
  • Draco18s
  • Members
  • 2414
  • 15995 posts
Posted February 18, 2020

You can't change the blockstates that a block has when making an override.

  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Share this post


Link to post
Share on other sites

JimiIT92    20

JimiIT92

JimiIT92    20

  • Dragon Slayer
  • JimiIT92
  • Members
  • 20
  • 745 posts
Posted February 19, 2020

That's what the error says, but if I really need to add a property to a vanilla block, like in this case make doors waterloggable, how could you do that, if there is a way to do it? 

  • Quote

Don't blame me if i always ask for your help. I just want to learn to be better :)

Share this post


Link to post
Share on other sites

diesieben07    7695

diesieben07

diesieben07    7695

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7695
  • 56361 posts
Posted February 19, 2020
1 hour ago, JimiIT92 said:

That's what the error says, but if I really need to add a property to a vanilla block, like in this case make doors waterloggable, how could you do that, if there is a way to do it? 

There isn't as that would make your replacement block incompatible with existing code that was written with the original block in mind.

  • Quote

Share this post


Link to post
Share on other sites

JimiIT92    20

JimiIT92

JimiIT92    20

  • Dragon Slayer
  • JimiIT92
  • Members
  • 20
  • 745 posts
Posted February 19, 2020

That's unfortunate, I understand why is it like this, but I still find it very limiting :/ I eventually thought that you can write your custom block with it's own ID and then replace it whrn is placed in the world, but is not the nicest solution I guess

  • Quote

Don't blame me if i always ask for your help. I just want to learn to be better :)

Share this post


Link to post
Share on other sites

Cadiboo    365

Cadiboo

Cadiboo    365

  • Reality Controller
  • Cadiboo
  • Members
  • 365
  • 3624 posts
Posted February 19, 2020
8 hours ago, JimiIT92 said:

That's unfortunate, I understand why is it like this, but I still find it very limiting :/ I eventually thought that you can write your custom block with it's own ID and then replace it whrn is placed in the world, but is not the nicest solution I guess

You could have a copy of the vanilla block in your mod that is the exact same + always true water logged

  • Quote

About Me

Spoiler

My Discord - Cadiboo#8887

My Website - Cadiboo.github.io

My Mods - Cadiboo.github.io/projects

My Tutorials - Cadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 4
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • TheMajorN
      Trying to make a crop have an "X" shape model

      By TheMajorN · Posted 7 minutes ago

      Heya,  So I created a crop and have everything in order with it, however I'm trying to change it from the square shape that it uses, as all crops use, to the X shape that flowers use.  How would I go about doing that? Any point in the right direction would be appreciated
    • Sepiceay
      RLCraft 2.8.2 Keeps crashing with the error code as follows

      By Sepiceay · Posted 29 minutes ago

      Unable to launch java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 6 at net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper.injectIntoClassLoader(CoreModManager.java:169) at net.minecraft.launchwrapper.Launch.launch(Launch.java:115) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.ArrayIndexOutOfBoundsException: 6 at org.objectweb.asm.ClassReader.readShort(Unknown Source) at org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.objectweb.asm.ClassReader.<init>(Unknown Source) at net.minecraftforge.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.getFieldType(FMLDeobfuscatingRemapper.java:224) at net.minecraftforge.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.parseField(FMLDeobfuscatingRemapper.java:192) at net.minecraftforge.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.setup(FMLDeobfuscatingRemapper.java:161) at net.minecraftforge.fml.common.asm.FMLSanityChecker.injectData(FMLSanityChecker.java:187) at net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper.injectIntoClassLoader(CoreModManager.java:164) ... 2 more I have restarted my computer and reinstalled the profile multiple times but I keep getting this error on startup. I can provide more lines if needed because all I need to do to replicate the logs is to try and open RLCraft. www
    • samjviana
      [1.16.5] How to make EnchantedBook go to Custom ItemGroup

      By samjviana · Posted 1 hour ago

      I making some custom emchantment, and would like them to show up on an Custom ItemGroup, but i don't know where to start, i tried looking into some classes and did some google about it, but can't find anything usefull.
    • ESCCarp
      Forge says this file does not have an app associated with it.

      By ESCCarp · Posted 1 hour ago

      i do  
    • LexManos
      forge a jar file not exe

      By LexManos · Posted 2 hours ago

      Some zip managers like to take control of the .jar file extension away from Java. Make sure you have Java installed and try running Jarfix once, then try the installer again.   Also, 1.12 is out of support, update.
  • Topics

    • TheMajorN
      0
      Trying to make a crop have an "X" shape model

      By TheMajorN
      Started 7 minutes ago

    • Sepiceay
      0
      RLCraft 2.8.2 Keeps crashing with the error code as follows

      By Sepiceay
      Started 29 minutes ago

    • samjviana
      0
      [1.16.5] How to make EnchantedBook go to Custom ItemGroup

      By samjviana
      Started 1 hour ago

    • ESCCarp
      2
      Forge says this file does not have an app associated with it.

      By ESCCarp
      Started 2 hours ago

    • Modder31
      1
      forge a jar file not exe

      By Modder31
      Started 2 hours ago

  • Who's Online (See full list)

    • TheMajorN
    • Loganator711
    • IDontCaboose
    • DWyvern
    • Chumbanotz
    • foxythesweat
    • redlynx
    • Sepiceay
    • -MCS_Gaming-
    • hammy3502
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.13.2] Vanilla block replacement
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community