Everything posted by Draco18s
-
[1.11.2] Setting a blocks bounding box
@Override public boolean isFullCube(IBlockState state) { return false; }
-
[1.11.2] Tile Entity Block Texture Not Updating When Property Changes
They all do slightly different things. I ended up with all four because something wasn't working right (turned out to be a problem elsewhere, oops) and having all four doesn't hurt necessarily. It could probably be reduced two two of them and work Just Fine. Next, there's actually three network methods, not two. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L176-L188 One is called when the TE is first created, the other the rest of the time (and no, I can't remember which is which).
-
[1.11.2] Tile Entity Block Texture Not Updating When Property Changes
Why are you extending BlockContainer? You don't need this, it fucks everything else up and stop using it. This does dick and as such you shouldn't even be extending BlockContainer at all, even if that class had value (which it doesn't): public TileEntity createNewTileEntity(World worldIn, int meta) { return null; } Seriously. WTF. Unless you meant for it to be abstract like the rest of the class... Why do you create your own FACING property? Why not using the one from BlockDirectional or BlockHorizontal? As for textures based on properties inside a TE, you need to sync the TE state to the client: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L95-L98
-
How to activate EntityAIFollowOwner
Those two tasks cannot run simultaneously and you have them at the same priority.
-
Give achievement based on item in hand.
if(player.hasAchievement(AchievementHandler.achievementBulletProof)) { if(!player.hasAchievement(AchievementHandler.achievementBattleReady)) { } } Are you testing and making sure that the you have the bullet proof achievement? And you do know you can parent achievements, right?
-
Give achievement based on item in hand.
- Tooltip that varies depending on the container
That's pretty much the only way you're going to be able to do it.- [1.11] Vanilla 3x3 recipes on larger crafting grids.
Obviously you know--or can determine--which 9 slots you passed into the simulated InventoryCrafting. Which means you can do the reverse in order to place items. "Oh, my top-left corner is [0][1] -> pass as input" later "Ok I need to construct output, here's the top-left corner, where does it go again? Oh right my top-left corner for input is [0][1]"- [1.11] Vanilla 3x3 recipes on larger crafting grids.
How about where they already are?- Give achievement based on item in hand.
It can't possibly be the only way you can figure out: it doesn't work for a variety of reasons. You have a meaningless loop (for example, if player.getHeldItemOffhand() isn't null, it will loop forever and never exit so really, what did you expect?) Have you tried player.getHeldItemOffhand().getItem() possibly?- Why are item textures not displaying?
http://mcforge.readthedocs.io/en/latest/concepts/sides/ ...Add an variant named "inventory"?- Interfacing With EntityPlayer to render effects when swimming
You would have to use the LivingUpdateEvent. And you'd have to write the swimming mechanics yourself.- Give achievement based on item in hand.
And you're still comparing an ItemStack to an Item- Give achievement based on item in hand.
I don't know. Maybe invoke it on the item stack in the player's hand?- Interfacing With EntityPlayer to render effects when swimming
That's not a good solution. What if there's some block....say....molten iron that when entities are inside it it sets them on fire? Your block would say "nope, not inside!" And besides, all the swimming code is inside the Entity class (for players, EntityPlayer) and explicitly checks for Material.WATER so again, your code double-fails because if someone wants to have a material other than water this code doesn't make the block swimmable.- [SOLVED][1.10.2]Entity Projectile Invisible
Yes but this: ClientProxy.registerRenderers(); Is in common code and that's a static reference to your client proxy. Next to the run button is a dropdown, click that and click "run server."- [SOLVED][1.10.2]Entity Projectile Invisible
You can't do this. This will 100% crash the dedicated server. Remember: the client proxy cannot load on the server, it references classes that don't exist. The only way to reference proxy methods is through an instance. Mainmod.instance.proxy.registerRenderers();- having difficulties with item model rendering. Console output included
Also, please use spoiler tags.- Why are item textures not displaying?
Proxies are not a Java thing. http://mcforge.readthedocs.io/en/latest/concepts/sides/ Your model can't be loaded because either: Your blockstate file lacks an inventory variant or because there is no item model json- [1.10.2] collision block
This does actually nothing: if(entityFacing == EnumFacing.NORTH) { entityFacing = EnumFacing.NORTH; } else if(entityFacing == EnumFacing.SOUTH) { entityFacing = EnumFacing.SOUTH; } else if(entityFacing == EnumFacing.EAST) { entityFacing = EnumFacing.EAST; } else if(entityFacing == EnumFacing.WEST) { entityFacing = EnumFacing.WEST; } If value is A, set value to A. If it's B, set it to B... You also have no code that supplies a different bounding box based on facing. You in fact, supply a single bounding box (which you reconstruct every time) regardless of block state: public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return new AxisAlignedBB(posX, posY, posZ, sizeX, sizeY, sizeZ); }- Initializing game java.lang.NullPointerException
Where I put it on Pastebin like a champ. http://pastebin.com/7QLw6KQV ModItems.blacktitaniumIngot is probably what's null. But I have no idea how or why because that'll involve at least two, probably three other classes. Post (on pastebin this time) your main mod class, your common proxy, and your ModItems class.- Initializing game java.lang.NullPointerException
Also don't create multiple threads. > at WGHxPERNAxBEAST.TutorialMod.handlers.RecipeHandler.registerCraftingRecipes(RecipeHandler.java:21) One of your recipes passes in a null item.- 2 problems with my mod
This is a "bug" in Eclipse. Simply click on anything in the Project Explorer again and it'll be fine. Alternatively you can edit your project's run directory to be a hardlinked rather than a programatic one. It's annoying as fuck and only occurs because of the bug and how Forge's setup points Eclipse at the run directory. Go to the Run Configurations window, find the "Arguments" tab and at the bottom, change the working directory from ${project_loc} to ${workspace_loc:MDKExample}\run- How to assighn current priority level of enitity ai task.
Override shouldExecute() and return false when the animal is fed.- Why are item textures not displaying?
Show the game's output log. The game prints all texture loading problems there. Also: Don't use event.getSide() == Side.CLIENT, use a ClientProxy class. Also also: The fuk? Use ModelLoader.setCustomModelResourceLocation(...) Also also also: Jesus H Christ on a crutch. What nonsense is this? ModItems.chain_mail.getRegistryName() - Tooltip that varies depending on the container
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.