Jump to content

DiamondMiner88

Members
  • Posts

    186
  • Joined

  • Last visited

Everything posted by DiamondMiner88

  1. Do you have an example? I learn and understand faster and easier when i have an example to decipher.
  2. Just going to put it in all one post: Any1 know why my GlassCutters don't work want to register properly? AIs it possible to shorten my ClientEventSubscriber and EventSubcriber? I have like ~400 blocks and want to shorten because IntelliJ is really slow error-checking 1000 lines of stuff. More than 1/2 is just entering blocks from my ModBlocks so i thought there's some way to just enter all in like a for-loop or something.
  3. What does this mean: AL lib: (EE) MMDevApiOpenPlayback: Device init failed: 0x80004005
  4. Fixed the Block registry problem, accidentally missed a block to register. Still have no idea whats wrong with the GlassCutters. Updated my GitHub
  5. Also have problems with AGlass<replace with different colors> gives me a null error. register with the AGlass<color> and each is extending BlockBaseGlassA AGlass 's BlockBaseGlassA Interestingly enough i see no difference between BlockBaseConcreteA and glassA other than its extended.
  6. Use diesieben's advice over mine, he knows more than me on modding.
  7. Ok, right click on your project in the package explorer -> buildpath -> configure build path, then in the tabs select librarys -> add EXTERNAL jars I use IntelliJ so had to search this one up
  8. I'm guessing i do that to the items too, but i have another problem it says this is null in my ClientEventSubscriber: registerItemModel(ModItems.DIAMOND_GLASS_CUTTER); registerItemModel(ModItems.IRON_GLASS_CUTTER); ClientEventSubscriber: ToolGlassCutter: Merged with ItemGlassCutter ItemGlassCutter: EventSubscriber: I tested without the glass_cutter s and everything was fine, everything rendered fine and worked, its just the glasscutter's, IDK whats wrong
  9. ClientEventSubscriber: ModItems: ModBlocks: EventSubscriber: ItemBase: ItemGlassCutter: ToolGlassCutter: BlockBaseConcreteA:
  10. What about this? Arrays.stream(new Block[]{ ModBlocks.A_CONCRETE_BLACK, ModBlocks.A_CONCRETE_WHITE, /* ModBlocks.A_GLASS_BLACK, ModBlocks.A_GLASS_BLUE, ModBlocks.A_GLASS_BROWN, ModBlocks.A_GLASS_CLEAR, ModBlocks.A_GLASS_CYAN, ModBlocks.A_GLASS_GRAY, ModBlocks.A_GLASS_GREEN, ModBlocks.A_GLASS_LIGHT_BLUE, ModBlocks.A_GLASS_LIME, ModBlocks.A_GLASS_MAGENTA, ModBlocks.A_GLASS_ORANGE, ModBlocks.A_GLASS_PINK, ModBlocks.A_GLASS_PURPLE, ModBlocks.A_GLASS_RED, ModBlocks.A_GLASS_SILVER, ModBlocks.A_GLASS_WHITE, ModBlocks.A_GLASS_YELLOW, */ /* ModBlocks.B_CONCRETE_BLACK, ModBlocks.B_CONCRETE_BLUE, ModBlocks.B_CONCRETE_BROWN, ModBlocks.B_CONCRETE_CYAN, ModBlocks.B_CONCRETE_GRAY, ModBlocks.B_CONCRETE_GREEN, ModBlocks.B_CONCRETE_LIGHT_BLUE, ModBlocks.B_CONCRETE_LIME, ModBlocks.B_CONCRETE_MAGENTA, ModBlocks.B_CONCRETE_ORANGE, ModBlocks.B_CONCRETE_PINK, */ }).forEach(block -> { Preconditions.checkNotNull(block.getRegistryName(), "Registry name cannot be null!"); registry.register( ModUtil.setCreativeTab( ModUtil.setRegistryNames( new ItemBlock(block), block.getRegistryName()) ) ); }); Think thats the problem
  11. Now i get an error like: [16:55:51] [main/ERROR] [FML]: Exception caught during firing event net.minecraftforge.client.event.ModelRegistryEvent@34260b5e: java.lang.NullPointerException: Block cannot be null! at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787) ~[guava-21.0.jar:?] at tk.diamondbuildz.mod.character.client.ClientEventSubscriber.registerItemBlockModel(ClientEventSubscriber.java:132) ~[ClientEventSubscriber.class:?] at tk.diamondbuildz.mod.character.client.ClientEventSubscriber.onRegisterModelsEvent(ClientEventSubscriber.java:54) ~[ClientEventSubscriber.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_ClientEventSubscriber_onRegisterModelsEvent_ModelRegistryEvent.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:144) ~[EventBus$1.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?] at net.minecraftforge.fml.client.FMLClientHandler.fireSidedRegistryEvents(FMLClientHandler.java:1062) [FMLClientHandler.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.fireSidedRegistryEvents(FMLCommonHandler.java:764) [FMLCommonHandler.class:?] at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:629) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:513) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_202] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_202] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_202] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_202] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_202] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_202] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_202] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_202] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] [16:55:51] [main/ERROR] [FML]: Index: 1 Listeners: [16:55:51] [main/ERROR] [FML]: 0: NORMAL [16:55:51] [main/ERROR] [FML]: 1: net.minecraftforge.fml.common.eventhandler.EventBus$1@5a5183ed [16:55:51] [main/ERROR] [FML]: 2: net.minecraftforge.fml.common.eventhandler.EventBus$1@68bfaa16 For client models
  12. Ummm the 1.13.2 branch has no src folder
  13. Dupe post no idea how to delete
  14. New problem now with Registry. I have a null pointer exeption here: Preconditions.checkNotNull(block.getRegistryName(), "Registry name cannot be null!"); Class
  15. I'm using mapping stable_39 getHorizontal is not in there. Can't use anything lower because i use parts that are only in there and higher.
  16. Still get the same error i need something else instead of EnumFacing.byIndex(meta);
  17. I have south,north,west,east for states and have { "variants": { "facing=south": { "model": "character_mod:a_concrete_black", "y": 0 }, "facing=west": { "model": "character_mod:a_concrete_black", "y": 90 }, "facing=north": { "model": "character_mod:a_concrete_black", "y": 180 }, "facing=east": { "model": "character_mod:a_concrete_black", "y": 270 } } } for my blockstates Code for it: @Override public IBlockState getStateFromMeta(int meta) { EnumFacing facing = EnumFacing.byIndex(meta); return this.getDefaultState().withProperty(FACING, facing); } @Override public int getMetaFromState(IBlockState state) { EnumFacing facing = state.getValue(FACING); return facing.getHorizontalIndex(); } @Override public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing blockFaceClickedOn, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { // find the quadrant the player is facing EnumFacing enumfacing = (placer == null) ? EnumFacing.NORTH : EnumFacing.fromAngle(placer.rotationYaw); return this.getDefaultState().withProperty(FACING, enumfacing); } That's what i already have, what do i need to remove and replace with your code?
  18. What do i use instead of getHorizontal? I get an error like [15:30:23] [main/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.RegistryEvent$Register@78519d63: java.lang.IllegalArgumentException: Cannot set property PropertyDirection{name=facing, clazz=class net.minecraft.util.EnumFacing, values=[north, south, west, east]} to down on block character_mod:a_glass_black, it is not an allowed value at net.minecraft.block.state.BlockStateContainer$StateImplementation.withProperty(BlockStateContainer.java:233) ~[BlockStateContainer$StateImplementation.class:?] at tk.diamondbuildz.mod.character.blocks.blockbases.a.BlockBaseGlassA.getStateFromMeta(BlockBaseGlassA.java:66) ~[BlockBaseGlassA.class:?] at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:330) ~[GameData$BlockCallbacks.class:?] at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:296) ~[GameData$BlockCallbacks.class:?] at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:358) ~[ForgeRegistry.class:?] at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:289) ~[ForgeRegistry.class:?] at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:122) ~[ForgeRegistry.class:?] at tk.diamondbuildz.mod.character.EventSubscriber.onRegisterBlocksEvent(EventSubscriber.java:44) ~[EventSubscriber.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_EventSubscriber_onRegisterBlocksEvent_Register.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:144) ~[EventBus$1.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?] at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:777) [GameData.class:?] at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:628) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:513) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_202] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_202] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_202] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_202] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_202] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_202] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_202] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_202] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] [15:30:23] [main/ERROR] [FML]: Index: 2 Listeners: [15:30:23] [main/ERROR] [FML]: 0: NORMAL [15:30:23] [main/ERROR] [FML]: 1: net.minecraftforge.fml.common.eventhandler.EventBus$1@6da640fe [15:30:23] [main/ERROR] [FML]: 2: net.minecraftforge.fml.common.eventhandler.EventBus$1@62832e24 [15:30:23] [main/ERROR] [FML]: 3: net.minecraftforge.fml.common.eventhandler.EventBus$1@48c49c1a
  19. Then what method do I use? I'm not new to modding but certainly not a expert at it. JDK: 1.8.0_202 I also tried 1.8.0_172 but same thing Information:java: Errors occurred while compiling module 'CharacterMod' Information:javac 1.8.0_172 was used to compile java sources Information:Module "CharacterMod" was fully rebuilt due to project configuration/dependencies changes Information:4/4/2019 2:54 PM - Compilation completed with 1 error and 0 warnings in 7 s 873 ms Error:java: invalid source release: 12 The 12 is changed to a different number by changing the Project language level in IntelliJ. I have it set to '12:No new language features' Looks like the compilation is successful but it's IntelliJ or some kind of library that's having trouble EDIT: Fixed by changing to 8
  20. Okay, byIndex() works it was a 50 50 so i guessed forgot to look at if it's static or not. When i run the MC Client i get this: Error:java: invalid source release: 12 IDK what that means
  21. I already understood what obfuscation means and what it does, i just didn't get how to find the new code. I'v hit a boulder again. Non-static method 'getHorizonstalIndex()' cannot be referenced from a static context @Override public IBlockState getStateFromMeta(int meta) { EnumFacing facing = EnumFacing.getHorizontalIndex(meta); return this.getDefaultState().withProperty(FACING, facing); }
  22. I tried downloading MCP and using the decompile.bat file to extract 1.12.2 but it returns a version less than the stable_39 and returns the minecraft source i had before all of this. This is soooo confusing.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.