Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Yurim64

Members
  • Content Count

    41
  • Joined

  • Last visited

Everything posted by Yurim64

  1. How can I make multiple blocks interact with a single main TileEntity? Maybe I could create a TileEntity for the ColossalChestPart to which I pass the main TileEntity?
  2. Hi! I was creating a block that is bigger than 1x1x1 with a custom tile entity. When i place the block, a part of the struct is spawned around (for now 1 single block above) and the tile entity is copied in the other position of the struct, but it result to be null. Here is the code: The Central Block: public class ColossalChest extends BaseChestBlock { protected static final int SIZE = 5; public ColossalChest() { super(Block.Properties.of(Material.METAL), BaseChestTileEntityType.COLOSSAL_CHEST::get); } @Override public void playerWillDestroy(Wo
  3. Hi! I would like to render the second layer of the player skins in 3D, but when I even try to change the position of the player's hat, nothing changes. Here is the Class: public class SkinLayerRenderer extends LivingRenderer<AbstractClientPlayerEntity, PlayerModel<AbstractClientPlayerEntity>> { public SkinLayerRenderer(EntityRendererManager p_i46102_1_) { this(p_i46102_1_, false); } public SkinLayerRenderer(EntityRendererManager p_i46103_1_, boolean p_i46103_2_) { super(p_i46103_1_, new PlayerModel<>(0.0F, p_i46103_2_), 0.5F);
  4. Ok, i finally make it work I leave it the code for everyone that need something like this. public static void readStructure(ResourceLocation res, World world, BlockPos pos) { if (world instanceof ServerWorld) { ServerWorld server = (ServerWorld) world; TemplateManager templateManager = server.getStructureManager(); Template template = templateManager.get(res); if (template != null) { template.placeInWorld(server, pos, new PlacementSettings().setRandom(server.random), server.random); System.out.
  5. Ok maybe i found out how can i spawn the struct, but i don't know how to get the CompoundNBT from the ResourcceLocation of the file. Can someone help?
  6. Hi! I have a file .nbt that represents a struct. The question is, how can i spawn that struct in a particular BlockPos?
  7. Hi! I was wandering if someone can explain how can i execute a command from code in minecraft 1.16.5. Thanks!
  8. Hi! I was wandering if there is some guide/tutorial on how i can create a particular custom dimension with the size of 16*16*16 in which i can place block and do some stuff. Basically something like the Compact Machine Mod, a reserved dimension for some stuff linked by a block
  9. Hi! I would like to know if there is a way to get the second layer of the player skin, and render it in a custom way
  10. Ok, and how could I do? To create it I could spawn n * n * n blocks, but to break it properly?
  11. Hi! I was wandering is there is a tutorial, or someone who can explain how i can create blocks that are big more than 1 (with collision, custom model ecc..). Thanks.
  12. Ok nothing, i adjust the light value in the TileEntityRenderer and now its fine For the open animation i just see the vanilla code and make it work. Thanks for the help
  13. Ok, now it renders, but with 2 problems: 1 -> It should be bronze color, but it's like on shadow 2 -> How can i animate it like a chest when open?
  14. The Mod Main: https://pastebin.com/ehmkfGN0 The Block Registry: https://pastebin.com/2QPPXvYR The Tile Entity Registry: https://pastebin.com/325NqTgw
  15. This is the TileEntity public class BaseChestTileEntity extends LockableLootTileEntity implements IChestLid, ITickableTileEntity { private NonNullList<ItemStack> inventory; protected float lidAngle; protected float prevLidAngle; protected int numPlayerUsing; private int tickSinceSync; private Supplier<Block> blockToUse; private final int id; protected BaseChestTileEntity(TileEntityType<?> type, Supplier<Block> blockToUse, int id) { super(type); this.id = id; this.inventory = NonNullList.withSize(this.getConta
  16. Hi have a custom TileEntity in my mod, but when i place it no model is rendered and i get this message in the console: What could I do?
  17. Hi! Im trying to create a block like an ender chest, so I copied the code from the vanilla, registered the various things and started the game. The problem is that the block appears transparent both in the world and in the inventory. The Block Class: https://pastebin.com/mWkZ0nLU The TileEntityClass: https://pastebin.com/Jy3953EY The TileEntityRenderer Class: https://pastebin.com/WTjrnatD Tile Tile Entity Register: https://pastebin.com/BKdcR8LK JSon: https://pastebin.com/hEGCrq3d Mod Setup: https://pastebin.com/x0xkdqXR
  18. How can i use the RecipeWrapper? I create a new RecipeWrapper with my ItemHandler, but then how can i get the fuel recipe from an item?
  19. So I need implements IItemHandler instead of IInventory? And then how can i get the smelting recipe of an item?
  20. public class SmeltingChestTileEntity extends TileEntity implements IInventory, INamedContainerProvider { private NonNullList<ItemStack> items = NonNullList.withSize(27, ItemStack.EMPTY); public SmeltingChestTileEntity() { super(Blocks.smeltingChestType); } @Override public CompoundNBT save(CompoundNBT nbt) { super.save(nbt); ItemStackHelper.saveAllItems(nbt, this.items); return nbt; } @Override public void load(BlockState state, CompoundNBT nbt) { super.load(state, nbt); this.items = NonNullList.withSize(
  21. Hi! I'm trying to create a custom tileentity that automatically cooks the item inside, but I don't know how to see if the inserted item has a smelting recipe or not. How can i see the recipes? I tried to copy from the FurnaceTileEntity, but the IRecipe result aslways null. @Override public void setItem(int index, ItemStack stack) { assert this.level != null : "Can't happend"; IRecipe<?> iRecipe = this.level.getRecipeManager().getRecipeFor(IRecipeType.SMELTING, this, this.level).orElse(null); ItemStack toInsert; if (iRecipe != null) {
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.