Everything posted by MGlolenstine
-
How to draw item models in world
Now I'm having an NPE at this line... It's interesting as it hasn't been there before... doRender(ei, ep.posX, ep.posY, ep.posZ, ep.cameraYaw, mc.getRenderPartialTicks()); It's the line I use to call the onRender method I posted above... When I surround it with try/catch and I put in System.out.println(ei+", "+ ep.posX+", "+ ep.posY+", "+ ep.posZ+", "+ ep.cameraYaw+", "+ mc.getRenderPartialTicks()); I get EntityItem['item.item.compass'/3916, l='MpServer', x=0.00, y=0.00, z=0.00], 0.5, 22.0, 0.5, 0.0, 0.43997753 in the console FIXED THE NPE
-
How to draw item models in world
like this? IBakedModel ibakedmodel = mc.getRenderItem().getItemModelWithOverrides(entity.getItem(), entity.world, null);
-
How to draw item models in world
Can you suggest me something else? I'll gladly accept it.
-
How to draw item models in world
I changed event, and now I get a NPE on this line IBakedModel ibakedmodel = ri.getItemModelWithOverrides(entity.getItem(), entity.world, null);
-
How to draw item models in world
let me check... will report It's not... hmm I think I know why... my class extends TESR...
-
How to draw item models in world
Would this work? private static final Minecraft mc = Minecraft.getMinecraft(); static RenderItem ri = mc.getRenderItem(); public static void doRender(EntityItem entity, double x, double y, double z, float entityYaw, float partialTicks) { ItemStack itemstack = entity.getItem(); int i = itemstack.isEmpty() ? 187 : Item.getIdFromItem(itemstack.getItem()) + itemstack.getMetadata(); boolean flag = false; GlStateManager.enableRescaleNormal(); GlStateManager.alphaFunc(516, 0.1F); GlStateManager.enableBlend(); RenderHelper.enableStandardItemLighting(); GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.pushMatrix(); IBakedModel ibakedmodel = ri.getItemModelWithOverrides(itemstack, entity.world, null); GlStateManager.translate(x, y+3f, z); ri.renderItem(itemstack, ibakedmodel); GlStateManager.popMatrix(); GlStateManager.disableRescaleNormal(); GlStateManager.disableBlend(); } EDIT: Just tried it and it isn't rendering anything... What's wrong with above code?
-
How to draw item models in world
How can I display them in world? I wanted to draw a quad and then show an item texture in it... How can I do that with models?
-
[1.6.4] Get the Resource/Resource location of any item.
How can I display them in world? I wanted to draw a quad and then show an item texture in it... How can I do that with models?
-
[1.6.4] Get the Resource/Resource location of any item.
Sorry for necrobumping this thread, but I was wondering how I'd do this in 1.12, because Item.getTextureLocation() doesn't exist anymore.
-
How to NOT render blocks?
But how would I do it?
-
How to NOT render blocks?
I'm trying to prevent loading of normal vanilla blocks without changing any metadata or tile entitying it... I want to make it similar to XRay... I'm making ore radar that makes blocks around you in a radius transparent/non-rendered...
-
How to NOT render blocks?
Well... I want to intercept the render... But I don't know how... Can I do it through event and which one to use then? I wanted to use RenderWorldEvent for that, but it doesn't exist anymore. And yea, I want to change all the blocks of the same type Aaaand I can't change blocks, so it has to be a render event.
-
How to NOT render blocks?
Is there any other way I could go about it?
-
How to NOT render blocks?
bump
-
[1.12] Forge(2443) | PlayerInteractEvent
Sorry didn't know that you others prefer Proxies
-
[1.12] Forge(2443) | PlayerInteractEvent
Sorry for being wrong I guess...
-
[1.12] Forge(2443) | PlayerInteractEvent
I think it's fired twice for CLIENT and twice for SERVER, add @SideOnly(Side.CLIENT) above EventBusSubscriber And make a counter of clicks, when the button is pressed, increase it by one and when it's 1, reset it to 0, only proceed when the counter is 0.
-
How to NOT render blocks?
I want to not render certain blocks inside certain chunks. I want there to be no texture in the place of the block... something like XRay... and 1 more question... What happened to RenderWorldEvent? I don't seem to be able to find it
-
How to set player "always sneaking"
Thanks!
-
How to set player "always sneaking"
Is there a packet I can send to server?
-
How to set player "always sneaking"
How do I set player to be always sneaking? Minecraft.getMinecraft().player.setSneaking(true); Doesn't appear to be working.
-
How can I get BoundingBoxes?
Thank you
-
How can I get BoundingBoxes?
In previous versions of Forge, I used this code to check if a person was standing on the edge of a block if (!mc.thePlayer.worldObj.getCollidingBoundingBoxes(mc.thePlayer, mc.thePlayer.getEntityBoundingBox().offset(mc.thePlayer.motionX, -1, mc.thePlayer.motionZ)).isEmpty()) return; How would I do that in 1.12? As far as I've been trying to get the worldObj, it doesn't seem that the normal world has getCollidingBoundingBoxes method included.
-
How can I get AbstractClientPlayer
Thank you!
-
How can I get AbstractClientPlayer
I only want to render ears for the local player and I'm calling it from RenderLivingEvent.Post event
IPS spam blocked by CleanTalk.