Jump to content

poopoodice

Members
  • Posts

    1160
  • Joined

  • Days Won

    7

Everything posted by poopoodice

  1. After researching what I'm trying to do now is hide the hand model in pre event, and after everything's being renderer, I make the arms model visible and trying to do some translation and rotation of it. Unfortunately it is not as easy as just leftArm.showModel = true; leftArm.render(matrix, event.getBuffers().getBuffer(model.getRenderType(player.getLocationSkin())), event.getLight(), OverlayTexture.NO_OVERLAY); The rotation angles and position must be set before actual render the model, otherwise it will just be there, ignore player rotations, and... acting weird. What do I actually need for this? Do I even need a custom PlayerRenderer and PlayerModel?
  2. you can use itemrenderer to draw items onto the screen (there are quite a lot of render item methods, check ItemRenderer or BeaconScreen), and I guess they are all pretty simple and straight forward, you should be able to get what they do.
  3. It says maxLength means the string read from the packet can not be longer than it, readString() passed in 32767. /** * Reads a string from this buffer. Expected parameter is maximum allowed string length. Will throw IOException if * string length exceeds this value! */ Quote from the comment
  4. is client only method marked as @OnlyIn(Dist.CLIENT). use readString(int maxLength) readString(int maxLength) instead
  5. don't use capital letters
  6. true, or enable blend may work?
  7. I think the alpha of RenderSystem.color4f should do the transparent rendering (0~1), I'm not sure tho.
  8. I think he what he mean is look into the code itself, how vanilla do such stuff
  9. // Forge: Use supplier method instead the comment above the deprecated Food.Builder.effect, basically telling you to use the above one
  10. you can also modify how the item looks like (translation, rotations... etc) with "gui"
  11. The write in Itemstack is something that writes an itemstack in a nbt tag iirc. What you are looking for should be either create a new CompoundNBT or getTag from the itemstack and use compound.putInt()... putBoolean... etc
  12. It's called ItemTier or something now, you can find it in Items from the items like shovels or so.
  13. iirc capabilities are only saved on the server
  14. Not sure if you already fix the problem or not, but there's always a "warning" when some error happened in the resources such as model/texture/blockstate not found... etc. I also don't think any of the blockstate file you've tried is with the correct format in 1.15. Try this: { "variants": { "": { "model": "examplemod:block/example_block"} } }
  15. probably wrong imports
  16. Blocks.GLASS_PANE.getDefualtState
  17. on client you can use Minecraft.getInstance.player to get the client player on server you can use getSender from the context and then getEntityWorld from the player entity
  18. have you register the renderer?
  19. what I mean is you are only rendering your "stem" part, which has nothing in it Stem = new ModelRenderer(this); Stem.setRotationPoint(0.0F, 24.0F, 0.0F); which all your other stuff are in private final ModelRenderer StemNeck; private final ModelRenderer StemTip; but you only render the stem part @Override public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){ Stem.render(matrixStack, buffer, packedLight, packedOverlay); }
  20. I'm not so sure but it seems like you are only rendering a part of your model private final ModelRenderer Stem; private final ModelRenderer StemNeck; private final ModelRenderer StemTip; public ThornWhipTipModel() { super(RenderType::getEntitySolid); textureWidth = 32; textureHeight = 32; Stem = new ModelRenderer(this); Stem.setRotationPoint(0.0F, 24.0F, 0.0F); StemNeck = new ModelRenderer(this); StemNeck.setRotationPoint(0.0F, 0.0F, 0.0F); Stem.addChild(StemNeck); StemNeck.setTextureOffset(0, 0).addBox(-1.0F, -6.0F, -8.0F, 2.0F, 2.0F, 8.0F, 0.0F, false); StemNeck.setTextureOffset(0, 10).addBox(0.0F, -6.0F, 0.0F, 2.0F, 2.0F, 3.0F, 0.0F, false); StemNeck.setTextureOffset(11, 10).addBox(-1.0F, -7.0F, -5.0F, 1.0F, 1.0F, 1.0F, 0.0F, false); StemNeck.setTextureOffset(4, 6).addBox(-2.0F, -6.0F, -2.0F, 1.0F, 1.0F, 1.0F, 0.0F, false); StemNeck.setTextureOffset(0, 6).addBox(1.0F, -5.0F, -7.0F, 1.0F, 1.0F, 1.0F, 0.0F, false); StemNeck.setTextureOffset(4, 3).addBox(-1.0F, -4.0F, -6.0F, 1.0F, 1.0F, 1.0F, 0.0F, false); StemTip = new ModelRenderer(this); StemTip.setRotationPoint(0.0F, 0.0F, 0.0F); Stem.addChild(StemTip); StemTip.setTextureOffset(0, 0).addBox(-1.0F, -6.0F, 3.0F, 2.0F, 1.0F, 2.0F, 0.0F, false); StemTip.setTextureOffset(7, 10).addBox(0.0F, -5.0F, 3.0F, 1.0F, 1.0F, 2.0F, 0.0F, false); StemTip.setTextureOffset(0, 3).addBox(0.0F, -6.0F, 5.0F, 1.0F, 1.0F, 2.0F, 0.0F, false); } @Override public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){ Stem.render(matrixStack, buffer, packedLight, packedOverlay); }
  21. provide more information such as log or even better a repo.
  22. urblock.getStateForPlacement or getDefualtState (you can still mess around with it) , and in your block class override hasTileEntity and return an instance of your custom te in createTileEntity. You can save the position of the master, and use world.getTileEntity to get the master te.
  23. I believe (s)he meant to say "show"
  24. I think you can use getSlotFor(ItemStack stack) on client side, and probably manually iterate through all the slots by yourself using getStackInSlot(slot) (check findAmmo in player class).
×
×
  • Create New...

Important Information

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