Everything posted by Draco18s
-
Item texturing without the json file
Note that for 2D item models, you need to copy the item/generated vanilla json and put it inside your block models folder to use as a parent: https://github.com/Draco18s/ReasonableRealism/tree/master/src/main/resources/assets/harderores/models/block/item https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderores/blockstates/largedust.json#L4
-
(SOLVED)[1.11]Help with particles
https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/client/ClientProxy.java#L96
-
[1.11.2] Pick up spawner with silk touch
Code tag. Use it.
-
Finding blocks connected to a start position
TL;DR: You can't insure you only get this tree's leaves. But you can get all of the log blocks. Every log in a tree is connected to every other log in one of the following ways: Up North South East West NE NW SE SW Up+North Up+South Up+East Up+West Up+NE Up+NW Up+SE Up+SW
-
[1.11.2] Setting a blocks bounding box
Nearly ALL methods in the block class are deprecated you'll notice. That means "don't call this" (use the IBlockState method instead) not "don't implement this."
-
[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); } - 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.