-
Posts
22 -
Joined
-
Last visited
Everything posted by JamesWilsonProductions
-
Is the CoFH lib updated or working in 1.10.2? Also, if so, are there any tutorials/docs out there on how I'd get started with it? Thanks! SOLVED: Download the API below. It works with 1.10.2. Thanks to @Animefan8888 for mentioning and to @XFactHD for clarifying what had to be Dl'd. https://github.com/CoFH/RedstoneFlux-API/tree/1.8
-
As the title says. How would I add method definitions to implemented Interfaces where you can hover over the Override-able method and it'll have a description of what it does, like Eclipse does. I went to the Forge API page, and none of the methods have descriptions, which really sucks (link below). I need method definitions for all IInventory methods (and all other interfaces I implement/classes I extend) because how else am I gonna learn what these methods do and when they are ran (If you know, please send me a link. The Forge Docs are actually kinda rubbish... lacks information). Thanks in advance! Link to Forge API page (Definitions non-existent)
-
What is the function of markDirty()?
JamesWilsonProductions replied to JamesWilsonProductions's topic in Modder Support
Awesome, thanks. -
The title says it all. what is the use of markDirty()? In the tutorial I'm following, I have to use it when adding and removing a cracker, and I want to understand why.
-
I have added EntityItem.hoverstart = 0f to fix my Special Rendering item to not be slightly rotated in one of the directions and I have no idea why it works. Can you please explain what this function does to the item. Thanks!
-
Just a basic question here. I have been following modding tutorials, and I have been passing values into worldIn in various methods. For example, I've passed this value in: Minecraft.getMinecraft().theWorld as one. My question is, what are all the different things I can pass into this, and what do they mean? =)
-
And what shall I do with isNormalCube? What is the difference between the two? And about those errors... I have no idea how to get rid of them, didn't even realize they were errors. Any ideas on that? This is the message I get when I hover over the errors: " Not annotated method overrides method annotated with @MethodsReturnNonnullByDefault This inspection reports problems related to @Nullable and @NotNull annotations usage configured in Constant conditions & exceptions inspection. " Worked like a charm btw! Thanks =)
-
Errors? What errors. If you're talking about the ruled out methods, those are the deprecated ones. Apparently I am still allowed to use them, as I couldn't find any alternative. This only applies to the Block class though. Here is where I register the block: package com.github.jameswilsonproductions.tutorial.init; import com.github.jameswilsonproductions.tutorial.blocks.BlockCheese; import com.github.jameswilsonproductions.tutorial.blocks.BlockJar; import com.github.jameswilsonproductions.tutorial.blocks.CheeseJar; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModBlocks { public static Block cheeseJar; public static void init(){ cheeseJar = new CheeseJar(); } public static void register(){ registerBlock(cheeseJar); } private static void registerBlock(Block block){ GameRegistry.register(block); ItemBlock item = new ItemBlock(block); item.setRegistryName(block.getRegistryName()); GameRegistry.register(item); } public static void registerRenders(){ registerRender(cheeseJar); } private static void registerRender(Block block){ Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory")); } }
-
Hello everyone, I have been trying to make a simple custom block that looks like a Jar. All models, render types and such are working perfectly. The only problem I'm having is that when I set the collision and bounding box size (It works) but when I walk into it when it's at head height, I suffocate into it. I have tried adjusting the size of the collision box and bounding box countless times, same results. I have also tried setting 'isFullBlock', 'isNormalBlockCube' and all other methods like that to "return false". That did nothing either. I have no idea how to fix this, been at it for about 2 hours now. Here is my code for the block (CheeseJar.java) =) package com.github.jameswilsonproductions.tutorial.blocks; import com.github.jameswilsonproductions.tutorial.Reference; import com.github.jameswilsonproductions.tutorial.Tutorial; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import javax.annotation.Nullable; import java.util.List; public class CheeseJar extends Block{ private AxisAlignedBB BOUNDING_BOX = new AxisAlignedBB(0.0625 * 4, 0, 0.0625 * 4, 0.0625 * 12, 0.0625 * 11, 0.0625 * 12); private AxisAlignedBB COLLISION_BOX = new AxisAlignedBB(0.0625 * 4, 0, 0.0625 * 4, 0.0625 * 12, 0.0625 * 11, 0.0625 * 12); public CheeseJar() { super(Material.GLASS); setUnlocalizedName(Reference.TutorialBlocks.CHEESEJAR.getUnlocalizedName()); setRegistryName(Reference.TutorialBlocks.CHEESEJAR.getRegistryName()); setSoundType(SoundType.GLASS); setHardness(.13f); setCreativeTab(Tutorial.CREATIVE_TAB); } @Override public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) { return false; } @Override public boolean isOpaqueCube(IBlockState state) { return false; } @Override public BlockRenderLayer getBlockLayer(){ return BlockRenderLayer.TRANSLUCENT; } @Override public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn) { super.addCollisionBoxToList(pos, entityBox, collidingBoxes, COLLISION_BOX); } @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return BOUNDING_BOX; } } COLLISION_BOX and BOUNDING_BOX are the same is because I was experimenting. BOUNDING_BOX is usually 1 pixel bigger that COLLISION_BOX. I have pasted all the code, as a I feel all the methods I'm using here, play a role in the problem Thanks for the help in advance! =) Maybe if you want a picture in the IntelliJ dark theme too, here is an attached file.