-
Posts
54 -
Joined
-
Last visited
Everything posted by Boy132
-
Thanks, that worked! I do bind the textureatlas resourcelocation and if I just use sprite.getName() it renders the "pink black missing texture" texture.
-
Basically the item tier is what used to be tool material in older versions. You create a class that implents IItemTier and then you pass that class to your item. (In simple words you "just copy" the vanilla ItemTier class and replace the values.)
-
[1.12.2] Get A Players SpawnPoint - Help is appreciated
Boy132 replied to Slastic's topic in Modder Support
1.12.2 isn't supported here. Please update to a newer minecraft version. In 1.15 there is PlayerEntity#getBedLocation. -
This isn't the right place for your problem at all. First of all this is the subforum for mod developers and second 1.7.10 will definitely don't get any support here. You can try to get help over at the technic launcher forums however.
- 1 reply
-
- 1
-
[1.15] Question about Recipes and Advancements
Boy132 replied to Fluorescent Flamingo's topic in Modder Support
You are correct. It is not required to create advancements for your recipes but if you do so you can control when the recipe appears in the recipe book. Look at the vanilla json files for examples. I guess reasons of simplicity? Because - correct me if I'm wrong - you can only check for a single item so let's say for the enchantment table you could only say "if you get obisidian OR a diamond you unlock the advancement". -
[1.14.4] How to use a player's face as an item texture
Boy132 replied to BlockyPenguin's topic in Modder Support
-
I think a Structure can spawn in every chunk and ScatteredStructure's are... scattered . Look at ScatteredStructure#getStartPositionForPosition for more details. Most of the vanilla structures (or actually all?) don't use any placement config so you have to manually check the config somewhere. I havn't done this either so I don't really know how and when to do this.
-
I think I found the issue: you set the templates x and z to 0. Just tested it with my code and it also didn't work when x and z are 0. So you should try this instead: this.templatePosition = new BlockPos(p_i49313_3_.getX(), 90, p_i49313_3_.getZ());
-
[1.14.4] How to use a player's face as an item texture
Boy132 replied to BlockyPenguin's topic in Modder Support
Have you looked at SkullTileEntityRenderer? And the player head calls methods from a tile entity because it's a block. (what have you have in your inventory is a BlockItem) -
I had a similar problem the last few days and I solved it by overriding func_225558_a_ in my structure class. For some reason the original function always returned false because generatorIn.hasStructure(biomeIn, this); always returned false although I added my structure to the biome. When using biomeIn.hasStructure(this) it returns the correct value. This doesn't really make sense because hasStructure from the ChunkGenerator basically just calls hasStructure from the Biome.
-
You need to actually call the Logger#log function. (e.g. LogManager.getLogger().log(Level.INFO, "debug info");) Also you should not use both methods that @imacatlolol mentioned above but rather choose one. If this works then you can access the container of the event (event.getContainer()) and can check if it's the HorseInventoryContainer (instanceof HorseInventoryContainer). And after that point I have no idea how to continue. Maybe adding a new Slot at the position of the old one? (maybe not the best idea ?)
-
Make sure your texture file is really in "textures/entity/projectile/" and look for related errors in your console log. (the vanilla arrow texture is in "projectiles" so you should check if you forgot the s)
-
If this is a json file named "arrows.json" in your "data/minecraft/tags/items" folder, then yes. Make sure this file is in the "minecraft" namespace and not in your modid namespace.
-
Did you add your custom arrow to the arrows tag?
-
Hello, I'm currently doing a fluid tank block and now I want to render the fluid in the gui: @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY); int fluidStored = getFluidStoredScaled(73); Fluid fluid = fluidTank.getFluid().getFluid(); if(fluid != Fluids.EMPTY) { ResourceLocation stillLocation = fluid.getAttributes().getStillTexture(fluidTank.getFluid()); TextureAtlasSprite sprite = Minecraft.getInstance().getAtlasSpriteGetter(PlayerContainer.LOCATION_BLOCKS_TEXTURE).apply(stillLocation); ResourceLocation spriteLocation = sprite.getName(); minecraft.getTextureManager().bindTexture(new ResourceLocation(spriteLocation.getNamespace(), "textures/" + spriteLocation.getPath() + ".png")); blit(guiLeft + 80, guiTop + 7 + (73 - fluidStored), 0, 16, fluidStored, sprite); } } The result is this: (left is water and right is lava) One problem is that the color of the water is wrong and that the scale (I guess?) is wrong. It should look something like this:
-
[1.15.2][SOLVED] Render Item with TileEntityRenderer
Boy132 replied to Boy132's topic in Modder Support
Works now: (it was didn't work because of the "matrixStack.rotate") RenderHelper.enableStandardItemLighting(); matrixStack.push(); matrixStack.scale(0.5f, 0.5f, 0.5f); matrixStack.translate(1, 1.5, 1); Minecraft.getInstance().getItemRenderer().renderItem(stack, TransformType.NONE, combinedLight, combinedOverlay, matrixStack, buffer); matrixStack.pop(); -
Hello, I updated my mod files from 1.14.4 to 1.15.2 but now me block doesn't render the item public class TERChoppingBlock extends TileEntityRenderer<TileEntityChoppingBlock> { public TERChoppingBlock(TileEntityRendererDispatcher rendererDispatcher) { super(rendererDispatcher); } @Override public void render(TileEntityChoppingBlock tileEntityChoppingBlock, float partialTicks, MatrixStack matrixStack, IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) { // GlStateManager.pushLightingAttributes(); // GlStateManager.pushMatrix(); matrixStack.push(); BlockPos blockPos = tileEntityChoppingBlock.getPos(); // GlStateManager.translated(blockPos.getX(), blockPos.getY(), blockPos.getZ()); // GlStateManager.disableRescaleNormal(); matrixStack.translate(blockPos.getX(), blockPos.getY(), blockPos.getZ()); renderItem(tileEntityChoppingBlock, matrixStack, buffer, combinedLight, combinedOverlay); matrixStack.pop(); // GlStateManager.popMatrix(); // GlStateManager.popAttributes(); } private void renderItem(TileEntityChoppingBlock tileEntityChoppingBlock, MatrixStack matrixStack, IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) { IItemHandler itemHandler = tileEntityChoppingBlock.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).orElse(null); if(itemHandler != null) { ItemStack stack = itemHandler.getStackInSlot(0); if(!stack.isEmpty()) { RenderHelper.enableStandardItemLighting(); // GlStateManager.enableLighting(); // GlStateManager.pushMatrix(); matrixStack.push(); // GlStateManager.scaled(0.5f, 0.5f, 0.5f); // GlStateManager.translated(1, 1.5, 1); // GlStateManager.rotatef(-90, 0f, 1f, 0f); matrixStack.scale(0.5f, 0.5f, 0.5f); matrixStack.translate(1, 1.5, 1); matrixStack.rotate(new Quaternion(0f, 1f, 0f, -90)); Minecraft.getInstance().getItemRenderer().renderItem(stack, TransformType.NONE, combinedLight, combinedOverlay, matrixStack, buffer); // Minecraft.getInstance().getItemRenderer().renderItem(stack, TransformType.NONE); matrixStack.pop(); // GlStateManager.popMatrix(); } } } } In the comments is my older 1.14 code. Wanted behavior from 1.14: (now in 1.15 the log block doesn't render) EDIT: I removed this line "matrixStack.translate(blockPos.getX(), blockPos.getY(), blockPos.getZ());" and now this is the result: (o.O)
-
I created a throwable rock item and I can throw it but the entity is not rendered. This is called during client setup: RenderingRegistry.registerEntityRenderingHandler(EntityRock.class, new IRenderFactory<Entity>() { @Override public EntityRenderer<? super Entity> createRenderFor(EntityRendererManager manager) { return new SpriteRenderer(manager, Minecraft.getInstance().getItemRenderer()); } }); I found setCustomClientFactory() when creating the entity type but I don't know if I must use it?
-
So I found this LootUtils class from Draco18s and edited it so I could also add Items to LootTables. If I run my mod within eclipse (runClient) it all works but if I build the mod and use it in my normal minecraft all block do not drop anything. Here's the LootUtils code: And my Event:
-
Hello! I updated my mod from 1.12 to 1.13 and when I join my Test world (created in 1.12, now joining with 1.13) some items and blocks in the world or in chests are missing. What can I do to prevent this? The registry names remained the same.
-
Hello! Since ItemDoor does no longer exist how do I create the item of a door? Do I have to make my own ItemDoor class? Thanks.
-
[1.13.2][SOLVED] Unable to resolve texture due to upward reference
Boy132 replied to Boy132's topic in Modder Support
https://pastebin.com/Vbc0Jjg4 https://pastebin.com/0794hj1M I tired "blocks/oak_planks", "block/oak_planks" and "oak_planks" (+ prominent "minecraft:") as texture. -
[1.13.2][SOLVED] Unable to resolve texture due to upward reference
Boy132 replied to Boy132's topic in Modder Support
I tried it with "oak_planks" and "block/oak_planks" in the model file but still the same error: Unable to resolve texture reference: block/oak_planks in mce:block/drying_rack_side Unable to resolve texture reference: block/oak_planks in mce:item/drying_rack -
Hello! I have a drying rack block with this blockstate json: { "forge_marker": 1, "defaults": { "model": "mce:drying_rack", "textures": { "leg": "minecraft:block/oak_planks" } }, "variants": { "facing": { "north": { "model": "mce:drying_rack_side", "y": 180 }, "south": { "model": "mce:drying_rack_side" }, "east": { "model": "mce:drying_rack_side", "y": 270 }, "west": { "model": "mce:drying_rack_side", "y": 90 } }, "inventory": [{}] } } But the console says: Unable to resolve texture due to upward reference: #leg in mce:block/drying_rack_side Unable to resolve texture due to upward reference: #leg in mce:block/drying_rack_side Unable to resolve texture due to upward reference: #leg in mce:block/drying_rack Unable to resolve texture due to upward reference: #leg in mce:block/drying_rack_side Unable to resolve texture due to upward reference: #leg in mce:block/drying_rack_side Unable to resolve texture reference: #leg in mce:block/drying_rack_side Unable to resolve texture reference: #leg in mce:item/drying_rack It worked in 1.12.2
-
Hey! Just a quick question: what's the 1.13 equivalent to IBlockState::isSideSolid ? Thanks.