Jump to content

JamesWilsonProductions

Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by JamesWilsonProductions

  1. Ah, alright. I was looking for a 1.10.2 "title" somewhere. Thanks. Alright, found the link. Edited post above =)
  2. @Animefan8888 Dude, you can do whatever you want with your channel. If you make a tutorial, I'd appreciate it, but I think I can just read the docs within the classes and figure it out for myself =) Thanks for the offer though.
  3. @XFactHD Could you send me the link to the 1.10.2 API please? I just downloaded (DL'd the wrong one) it and noticed I had many errors, one being all ForgeDirections should be converted to EnumFacings. Thanks!
  4. Is that Youtube playlist just for 1.10.2 in general, or specifically directed at the CoFH Lib?
  5. 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
  6. I did try solve it on my own before, but came up dry, then I had the bright idea to search it up in general terms (without "MC Forge" in my search). The benefit of this is that anyone else searching the question will see this page. I like doing this, as it can help others =) Cheers!
  7. Welp, finally figured it out! For all you guys out there that are asking the same question, what you want to do is click on the method you wanna view and then press <Ctrl+Q> or <Alt+ButtonClick2> and that'll show you the method description. Cheers!
  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)
  9. 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.
  10. 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!
  11. Oh my goodness, I never knew this forge documentation existed! Thanks for sending me the link. This should keep me occupied for awhile. Hopefully by the end of tonight, I will be able to distinguish when to use what.
  12. Do you have any sources that can explain what must happen in server and what must happen in client, and which world param to use based on that. I'm still confused about the difference between them. =)
  13. Oh, oops, my mistake. So.. after a year or so, I thought the act of putting a variable into a method was called 'parsing'. Right... so passing it in =) Thanks for correcting me on this, can't believe it's never been corrected after all this time.
  14. 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? =)
  15. 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 =)
  16. 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")); } }
  17. 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.
×
×
  • Create New...

Important Information

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