Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Colored Sheep

Members
  • Joined

  • Last visited

  1. Thanks. That was the problem. The MODID value was incorrect and I needed 2 folders in the resources. Now the models load and display properly. May I ask why a Common Proxy doesn't make sense? I always thought that if a code needs to be executed on both, ClientProxy and ServerProxy, one could always do it from a common place instead of writing the code in each side separately. Plus one could always override methods in subclasses of a Common Proxy. All in all, even though it works now, I think you are right. I must re-write the whole thing from scratch. This is a mod that started in 1.10.2 which I then ported to 1.11.2 and now finally I port it to 1.12.2. But I guess most of the things that most modders did back in the day have changed.
  2. The error that I am getting is: [main/ERROR] [FML]: Exception loading model for variant levoment_hammertools:itemwoodsuperaxe#inventory for item "levoment_hammertools:itemwoodsuperaxe", normal location exception: and attached to it Caused by: java.io.FileNotFoundException: levoment_hammertools:models/item/itemwoodsuperaxe.json This is my repository. Why is it looking for a JSON in that place when it should be looking for the Blockstate JSON and then load the OBJ from the path in the Blockstate resource JSON?
  3. I see. I implemented it like so @Override public IBlockState getStateFromMeta(int meta) { EnumFacing enumFacing = EnumFacing.getHorizontal(meta); return this.getDefaultState().withProperty(BlockProperties.FACING, enumFacing); } But I can still see for a fraction of a second the texture getting rotated. On the server only. This doesn't happen in single player. Maybe I wrongly implemented it? Edit: I can see no errors on the server log either. Nor there is printed text when placing the block, other than anything I write with System.out.println(...)
  4. I remember that the tutorial I was following had getStateFromMeta implemented, but the IDE is marking that method as deprecated so I removed it. Is it still okay to use it? Isn't there another method?
  5. public class BlockChiseledMarble extends Block { public BlockChiseledMarble(Material materialIn) { super(materialIn); //Set the unlocalized and registry names this.setUnlocalizedName(References.ShinyModBlocks.BLOCKCHISELEDMARBLE.getUnlocalizedName()); this.setRegistryName(References.ShinyModBlocks.BLOCKCHISELEDMARBLE.getRegistryName()); //Set the hardness and harvest level this.setHardness(Blocks.STONE.getDefaultState().getBlockHardness(null, null)); this.setHarvestLevel("pickaxe", 0); //Set the sound for when breaking the block this.setSoundType(SoundType.STONE); this.setDefaultState(this.getDefaultState().withProperty(BlockProperties.FACING, EnumFacing.NORTH)); } @Override public int getMetaFromState(IBlockState state) { EnumFacing facing = state.getValue(BlockProperties.FACING); int facingValue = facing.getHorizontalIndex(); return facingValue; } @Override protected BlockStateContainer createBlockState() { IProperty<EnumFacing> properties = BlockProperties.FACING; return new BlockStateContainer(this, properties); } @Override public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) { return this.getDefaultState().withProperty(BlockProperties.FACING, placer.getHorizontalFacing()); } } BlockProperties is a class public class BlockProperties { public static IProperty<EnumFacing> FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL); }
  6. Hi I have a block with a facing property public static IProperty<EnumFacing> FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL); When I place it, I use the following code because the texture has orientation @Override public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) { //Debugging line System.out.println("Player facing: " + placer.getHorizontalFacing()); return this.getDefaultState().withProperty(BlockProperties.FACING, placer.getHorizontalFacing()); } And after it has been placed I tried to debug to try to understand why the texture is changing orientation in the server @Override public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { //Debugging line System.out.println("Block facing:" + state.getProperties().get(BlockProperties.FACING)); super.onBlockPlacedBy(worldIn, pos, state, placer, stack); } When playing single player, everything works fine and the block looks good. No texture gets changed. But when playing on a server, the texture of the block changes orientation. On multiplayer server and single player, the output is the same on both methods. But on the server, I can temporarily see for a fraction of a second that once the block is placed, it rotates my texture, even though the facing of the block stays the same. The version is 1.12.2
  7. Thanks! I sort of found that thread a few seconds ago and edited my main post. Would there be a way to identify coremods in places where one downloads mods to play?
  8. I was reading this post and it feels like core modding is something bad. What are core mods? Are they bad? Edit: Nevermind. I found a post with information on it. http://www.minecraftforge.net/forum/topic/62870-what-is-a-coremod-and-what-are-it-advantages-and-disadvantages/ I don't know how to delete my post. Although I still wonder if there is a way to identify which mod out there is a coremod.
  9. Hi I have an interface named CommonProxy.java which is implemented by ClientProxy.java and ServerProxy.java according to the tutorials I followed. In which implementing class should I call GameRegistry.registerTileEntity(...) and NetworkRegistry.INSTANCE.registerGuiHandler(...); The version is 1.12.2. Does it has to be on one side or does it has to be on both?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.