Jump to content

h3tR

Members
  • Posts

    25
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by h3tR

  1. Hi all, I'm creating a tech mod and I want to add some fluids for use in the machines. I don't need them to be placeable or anything like that so I only will ever use the FluidStacks of the Fluid. I haven't found a proper way to do this however as I have only been able to find tutorials and implementations in forge that are placeable. Is there a proper way to do this or do I just have to add the ForgeFlowingFluid anyway and just not add a block for it? Any help is greatly appreciated!
  2. No, you will have to download one that is for windows. I suggest downloading the Windows x64 installer.
  3. I don’t think you have the proper java version installed. You need that to run the .jar file that makes up the installer. You can download it here: https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html
  4. You can find it in the logs directory found at Or for short
  5. Hi everyone, I want to have an item where I can give it a color during runtime. I think the way to do this involves having multiple layers in the item model just like the vanilla potion does. How would I do such thing?
  6. I think what you want is new ItemStack(ModItems.JELLYFISH_JELLY.getDefaultInstance())
  7. Hi everyone, My mod is in a finished state and I wanted to test it once more before publishing it using the actual minecraft launcher with forge. Whenever I click play nothing happens. No error message, no instant ctd just nothing. That is until I close the launcher and restart it which is when i get the default message: I couldn't figure anything out when I checked debug.log except that it had something to do with the mixins in my mod. Which is a single mixin that enables adding a structure to jigsaw pools. Here is the debug.log. This never happened in the IntelliJ IDEA so I am only now seeing this. If you need any code, feel free to ask. Thank you for the help!
  8. Hi everyone, I want to have a tag for a structure I made for my mod. for use on treasure maps. When I test it using the /locate command the tag doesn't appear in the list. I'm not sure if this means that the tag doesn't exist or that it doesn't have any entries. Here is the code I use for creating the tags (I copied it from how they do it in net.minecraft.tags.ConfiguredStructureTags) public static class Structures{ public static final TagKey<ConfiguredStructureFeature<?, ?>> ABANDONED_BOTTLING_PLANT = createStructureTag("on_abandoned_bottling_plant_maps"); private static TagKey<ConfiguredStructureFeature<?, ?>> createStructureTag(String name){ return TagKey.create(Registry.CONFIGURED_STRUCTURE_FEATURE_REGISTRY, new ResourceLocation(name)); } } } (Inside the createStructureTag method I tried the ResourceLocation both with and without mod id) Did I forget anything here or maybe something I have to do in my Mod class or did I do something wrong in the JSON file. { "replace": false, "values": [ "pepsimc:abandoned_bottling_plant" ] } (btw my structure does work entirely fine) Thanks for the help!
  9. you might be able to do that with mixins. I’m not sure how they work but I suggest looking into that
  10. I think what you need is to add these two properties to Item.Properties when you register your item. .craftRemainder(Item you want it to become) .stacksTo(1) This is how the lava bucket does it: new Item.Properties()).craftRemainder(BUCKET).stacksTo(1).tab(CreativeModeTab.TAB_MISC) The only downside is that you probably won't be able to use the fuel block in recipes because it will give the item it will turn into as a remainder.
  11. You will need to use a DataSlot to actually pass the ContainerData over to the client. You can do this by just adding this line this.addDataSlots(data); to the constructor of your menu. I don't think you need to change anything else.
  12. Not sure what you posted here but that is not it. You can find it in C:\Users\"your username"\AppData\roaming\.minecraft\logs\latest.log or %appdata%\roaming\.minecraft\logs\latest.log
  13. Hi everyone, I have this custom village building in my mod (1.18.2) that I have implemented (as far as I know) in the same way as the folks from Immersive Engineering have done it. It works but I have only found around 5 or 6 cases where it did spawn even if I have set the weight of the piece to the max value (which is 150). I have done some testing but unfortunately I have no clue what is causing it. Here are some things I have discovered. I added this line of code after adding the pieces to their respective pools. TEMPLATE_POOL.get(new ResourceLocation("village/desert/houses")).getShuffledTemplates(new Random(0)).forEach(e->LogUtils.getLogger().debug(e.toString())); This showed the weights like they should be (150) . When using jigsaw blocks to spawn the jigsaw pieces the pieces were almost always my custom building so I assume that also works with my given weight. In a world with the exact same seed when I have disabled the piece being added any village has way less buildings than whenever I do add the pieces. Adding the piece multiple time to the village Pools does not change anything. I know this is quite niche and not many people might know what the issue is or even how to solve it. My theory is that maybe somehow the piece I added has a lot of criteria for the terrain or something (if that is a thing) that are almost never met or that no matter the weight I set for the piece I add, when it gets naturally generated it uses weight 1 for some reason. I could be dead wrong but I think those are the most likely. Every bit of help is appreciated. Thanks a lot! P.S. If you want me to show some code, feel free to ask.
  14. Hi, I have a recipeType that can be crafted in two separate blocks. I want to know how I would implement it so that JEI displays both blocks as able to craft the recipe Example I have implemented it for one of the blocks but I couldn't figure out how to do the second, even after reading the wiki on JEI's github page. If any more information is required feel free to ask! (I'm on 1.18.2 btw) Thanks!
  15. Hi, I want to render a texture on top of an item in an AbstractContainerScreen. When I just do blit without any other methods it only gets drawn on top half of the time. Are there any methods I can use to increase the depth or something. (I know RenderSystem.depthFunc() exists but I didn't find it to work when I tried it with this example) I know this might be lacking context so please feel free to ask for my code or any other things you need. Thank you!
  16. Hi, I have a structure that I want to spawn in villages. They used to work back in 1.17.xx but Since porting to 1.18.2 that is the only feature that I haven't figured out how to make it work. I have tried every method I found online including some mixin implementations but they didn't work either. So now I've been following a tutorial made by TelepathicGrunt on Github which uses accesstransformers(which have been applied succesfully) but unfortunately I haven't gotten it to work. I've done some troubleshooting and I found out that the structure does in fact get added to the required pool but that is I really got out of it. Here is my code: @Mod.EventBusSubscriber(modid = "pepsimc") public class WorldEvents { @SubscribeEvent public static void addVillageTemplate(final ServerAboutToStartEvent event){ //TODO Registry<StructureTemplatePool> templatePoolRegistry = event.getServer().registryAccess().registry(Registry.TEMPLATE_POOL_REGISTRY).orElseThrow(); Registry<StructureProcessorList> processorListRegistry = event.getServer().registryAccess().registry(Registry.PROCESSOR_LIST_REGISTRY).orElseThrow(); String[] biomes = {"plains","snowy","savanna","desert","taiga"}; for (String biome : biomes) { addBuildingToPool(templatePoolRegistry, processorListRegistry, new ResourceLocation("village/" + biome + "/houses"), "pepsimc:village/" + biome + "/houses/" + biome + "_pepsi_store_1", 5); } } private static void addBuildingToPool(Registry<StructureTemplatePool> templatePoolRegistry, Registry<StructureProcessorList> processorListRegistry, ResourceLocation poolRL, String nbtPieceRL, int weight) { // Grabs the processor list we want to use along with our piece. // This is a requirement as using the ProcessorLists.EMPTY field will cause the game to throw errors. // The reason why is the empty processor list in the world's registry is not the same instance as in that field once the world is started up. Holder<StructureProcessorList> emptyProcessorList = processorListRegistry.getHolderOrThrow(ResourceKey.create( Registry.PROCESSOR_LIST_REGISTRY, new ResourceLocation("minecraft", "empty"))); // Grab the pool we want to add to StructureTemplatePool pool = templatePoolRegistry.get(poolRL); if (pool == null) return; // Grabs the nbt piece and creates a SinglePoolElement of it that we can add to a structure's pool. // Use .legacy( for villages/outposts and .single( for everything else SinglePoolElement piece = SinglePoolElement.legacy(nbtPieceRL, emptyProcessorList).apply(StructureTemplatePool.Projection.RIGID); // Use AccessTransformer or Accessor Mixin to make StructureTemplatePool's templates field public for us to see. // Weight is handled by how many times the entry appears in this list. // We do not need to worry about immutability as this field is created using Lists.newArrayList(); which makes a mutable list. for (int i = 0; i < weight; i++) { pool.templates.add(piece); } // Use AccessTransformer or Accessor Mixin to make StructureTemplatePool's rawTemplates field public for us to see. // This list of pairs of pieces and weights is not used by vanilla by default but another mod may need it for efficiency. // So let's add to this list for completeness. We need to make a copy of the array as it can be an immutable list. List<Pair<StructurePoolElement, Integer>> listOfPieceEntries = new ArrayList<>(pool.rawTemplates); listOfPieceEntries.add(new Pair<>(piece, weight)); pool.rawTemplates = listOfPieceEntries; } } I feel like there is just one thing that I'm overseeing so any help shall be greatly appreciated. Thank you very much!
  17. I have provided the Block, BlockEntity, custom BlockStateProperty Class and the Method my initial post overrides below (in order) for context in the final method getRecipe returns an Optional<BottlerRecipe> which just gets the recipe if there is one. public class AutomatedBottlerBlock extends HorizontalFacedBlock implements EntityBlock { public AutomatedBottlerBlock() { super(Properties .of(Material.PISTON) .strength(4.5f,15) .sound(SoundType.METAL) .requiresCorrectToolForDrops()); } @SuppressWarnings("deprecation") public void onRemove(BlockState state, Level level, BlockPos pos, BlockState secondState, boolean p_196243_5_) { if (!state.is(secondState.getBlock())) { BlockEntity blockEntity = level.getBlockEntity(pos); if (blockEntity instanceof AutomatedBottlerEntity automatedbottlerentity) { Containers.dropContents(level, pos, automatedbottlerentity.getNNLInv()); level.updateNeighbourForOutputSignal(pos, this); } super.onRemove(state, level, pos, secondState, p_196243_5_); } } @Override public @NotNull InteractionResult use(BlockState state, Level world, BlockPos pos, Player plr, InteractionHand hand, BlockHitResult hit) { if (!world.isClientSide()) { BlockEntity entity = world.getBlockEntity(pos); if(entity instanceof AutomatedBottlerEntity) { NetworkHooks.openGui(((ServerPlayer)plr), (AutomatedBottlerEntity)entity, pos); } else { throw new IllegalStateException("Container provider is missing!"); } } return InteractionResult.sidedSuccess(world.isClientSide()); } @Override public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return PepsiMcBlockEntity.AUTOMATED_BOTTLER_BLOCK_ENTITY.get().create(pos, state); } @Nullable @Override public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState state, BlockEntityType<T> type) { if (level.isClientSide()) { return null; } else { return (level1, pos, state1, tile) -> { if (tile instanceof AutomatedProcessingBlockEntity Machine) { Machine.tickServer(); } }; } } @Override protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { super.createBlockStateDefinition(builder); builder.add(BlockStateProperties.POWERED); builder.add(PepsiMcBlockStateProperties.BOTTLING); } @Nullable @Override public BlockState getStateForPlacement(BlockPlaceContext context) { return super.getStateForPlacement(context) .setValue(BlockStateProperties.POWERED,false) .setValue(PepsiMcBlockStateProperties.BOTTLING, PepsiMcBlockStateProperties.BottlerActivity.NONE); } } public class AutomatedBottlerEntity extends AutomatedProcessingBlockEntity implements MenuProvider { public AutomatedBottlerEntity(BlockPos pos, BlockState state) { super(PepsiMcBlockEntity.AUTOMATED_BOTTLER_BLOCK_ENTITY.get(), pos, state, 1000, 5); } protected Optional<BottlerRecipe> getRecipe(){ return this.getLevel().getRecipeManager().getRecipeFor(BottlerRecipe.BottlerRecipeType.INSTANCE, getSimpleInv(),this.getLevel()); } protected void finishProduct() { Optional<BottlerRecipe> recipe = getRecipe(); recipe.ifPresent(iRecipe->{ itemHandler.extractItem(0, 1, false); itemHandler.extractItem(1, 1, false); itemHandler.extractItem(2, 1, false); itemHandler.insertItem(3, iRecipe.getResultItem(), false); itemHandler.insertItem(4, iRecipe.getByproductItem(), false); setChanged(); }); } @Override protected int getOutputSlot() { return 3; } @Override protected int getByProductSlot() { return 4; } @Override public void tickServer() { super.tickServer(); BlockState updatedState = level.getBlockState(worldPosition); if(energyStorage.getEnergyStored()<=0) { level.setBlock(worldPosition,updatedState.setValue(PepsiMcBlockStateProperties.BOTTLING, PepsiMcBlockStateProperties.BottlerActivity.NONE).setValue(BlockStateProperties.POWERED, false),Block.UPDATE_ALL); }else{ updatedState.setValue(BlockStateProperties.POWERED,true); if(Progress>0&&itemHandler.getStackInSlot(0).sameItem(new ItemStack(PepsiMcItem.EMPTY_BOTTLE.get()))) level.setBlock(worldPosition,updatedState.setValue(PepsiMcBlockStateProperties.BOTTLING, PepsiMcBlockStateProperties.BottlerActivity.BOTTLE).setValue(BlockStateProperties.POWERED, false),Block.UPDATE_ALL); else if(Progress>0&&itemHandler.getStackInSlot(0).sameItem(new ItemStack(PepsiMcItem.EMPTY_CAN.get()))) level.setBlock(worldPosition,updatedState.setValue(PepsiMcBlockStateProperties.BOTTLING, PepsiMcBlockStateProperties.BottlerActivity.CAN).setValue(BlockStateProperties.POWERED, false),Block.UPDATE_ALL); else level.setBlock(worldPosition,updatedState.setValue(PepsiMcBlockStateProperties.BOTTLING, PepsiMcBlockStateProperties.BottlerActivity.NONE).setValue(BlockStateProperties.POWERED, false),Block.UPDATE_ALL); } assert level != null; level.setBlockAndUpdate(worldPosition,updatedState); } @Override protected ItemStackHandler createHandler() { return new ItemStackHandler(5) { @Override protected void onContentsChanged(int slot) { setChanged(); } @Override public int getSlotLimit(int slot){ if(slot == 4) return 16; return 64; } @Override public boolean isItemValid(int slot, @Nonnull ItemStack stack) { return switch (slot) { case 0 -> stack.getItem().getDefaultInstance().getTags().toList().contains(PepsiMcTags.Items.BOTTLING_CONTAINER); case 1 -> stack.getItem().getDefaultInstance().getTags().toList().contains(PepsiMcTags.Items.BOTTLING_LABEL); case 2 -> stack.getItem().getDefaultInstance().getTags().toList().contains(PepsiMcTags.Items.BOTTLING_LIQUID); case 3 -> stack.getItem().getDefaultInstance().getTags().toList().contains(PepsiMcTags.Items.BOTTLED_LIQUID); case 4 -> stack.getItem() == Items.BUCKET; default -> false; }; } @Override @Nonnull public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate) { if(!isItemValid(slot, stack)) { return stack; } return super.insertItem(slot, stack, simulate); } }; } @Override protected LazyOptional<IItemHandler> getOutHandler() { return LazyOptional.of(()->new IItemHandler(){ @Override public int getSlots() { return 2; } @NotNull @Override public ItemStack getStackInSlot(int slot) { return itemHandler.getStackInSlot(slot+3); } @NotNull @Override public ItemStack insertItem(int slot, @NotNull ItemStack stack, boolean simulate) { return itemHandler.insertItem(slot+3, stack, simulate); } @NotNull @Override public ItemStack extractItem(int slot, int amount, boolean simulate) { return itemHandler.extractItem(slot+3,amount,simulate); } @Override public int getSlotLimit(int slot) { return itemHandler.getSlotLimit(slot+3); } @Override public boolean isItemValid(int slot, @NotNull ItemStack stack) { return itemHandler.isItemValid(slot+3,stack); } }); } @Override public @NotNull Component getDisplayName() { return new TranslatableComponent("block.pepsimc.automated_bottler"); } @Nullable @Override public AbstractContainerMenu createMenu(int id, @NotNull Inventory inv, @NotNull Player p_39956_) { return new AutomatedBottlerMenu(id,inv,this,dataAccess); } } public class PepsiMcBlockStateProperties { public static final EnumProperty<BottlerActivity> BOTTLING = EnumProperty.create("bottling", BottlerActivity.class); public enum BottlerActivity implements StringRepresentable { NONE("none"), CAN("can"), BOTTLE("bottle"); private final String name; private BottlerActivity(String p_61824_) { this.name = p_61824_; } public String toString() { return this.getSerializedName(); } public @NotNull String getSerializedName() { return this.name; } } } public void tickServer() { if (getRecipe().isPresent() && (PreviousRecipe==null || PreviousRecipe.isEmpty() || getRecipe().get() != PreviousRecipe.get())) { Goal = getRecipe().get().ticks; } PreviousRecipe = getRecipe(); if(energyStorage.getEnergyStored()>0 && getRecipe().isPresent() && (isSlotEmpty(getOutputSlot()) || (isSlotFull(getOutputSlot())) && getRecipe().get().getResultItem().sameItem(itemHandler.getStackInSlot(getOutputSlot())) && (getByProductSlot() < 0 ||isSlotEmpty(getByProductSlot()) || (isSlotFull(getByProductSlot())) && getRecipe().get().getByproductItem().sameItem(itemHandler.getStackInSlot(getByProductSlot()))))) { Progress++; if(Progress>=Goal){ Progress = 0; finishProduct(); } energyStorage.consumeEnergy(1); }else{ Progress = 0; } }
  18. Hi, I'm making a block that has responsive textures. for example a "light" that indicates if the machine is powered or not. It is used by a BlockEntity and the BlockState updates inside a method being called by its ticker (server side). Unfortunately it does not actually update at all. I'm quite sure the issue is not with the blockstates file itself because I can set it in getStateForPlacement() Here is the code: @Override public void tickServer() { super.tickServer(); BlockState updatedState = level.getBlockState(worldPosition); if(energyStorage.getEnergyStored()<=0) { level.setBlock(worldPosition,updatedState.setValue(PepsiMcBlockStateProperties.BOTTLING, PepsiMcBlockStateProperties.BottlerActivity.NONE).setValue(BlockStateProperties.POWERED, false),Block.UPDATE_ALL); }else{ updatedState.setValue(BlockStateProperties.POWERED,true); if(Progress>0&&itemHandler.getStackInSlot(0).sameItem(new ItemStack(PepsiMcItem.EMPTY_BOTTLE.get()))) level.setBlock(worldPosition,updatedState.setValue(PepsiMcBlockStateProperties.BOTTLING, PepsiMcBlockStateProperties.BottlerActivity.BOTTLE).setValue(BlockStateProperties.POWERED, false),Block.UPDATE_ALL); else if(Progress>0&&itemHandler.getStackInSlot(0).sameItem(new ItemStack(PepsiMcItem.EMPTY_CAN.get()))) level.setBlock(worldPosition,updatedState.setValue(PepsiMcBlockStateProperties.BOTTLING, PepsiMcBlockStateProperties.BottlerActivity.CAN).setValue(BlockStateProperties.POWERED, false),Block.UPDATE_ALL); else level.setBlock(worldPosition,updatedState.setValue(PepsiMcBlockStateProperties.BOTTLING, PepsiMcBlockStateProperties.BottlerActivity.NONE).setValue(BlockStateProperties.POWERED, false),Block.UPDATE_ALL); } assert level != null; level.setBlockAndUpdate(worldPosition,updatedState); } Feel free to ask for more code if needed. Thanks!
  19. Here you go. Github
  20. I probably needed to explain some more things because, yeah, from reading my post it is quite confusing. I called the setShaderTexture() twice. Once in the renderBackground() method for the screen and once for the render method for the display class. I did bindForSetup because I didn't know what it did and I saw it being used in another widget so I thought it would be useful (I removed it now though!). I used this.blit() initially but because it wasn't working I thought somehow Minecraft.getInstance().screen.blit() would be something different so I just tried that as a solution (also replaced that now). I now added the widget in the init method for the screen and the super.render() method was already being called in the screen render method however I replaced it in with "//..." because otherwise the post would be pretty long as I'm doing a lot of other things in the method as well. Looking back at it that wasn't very helpful. Just like previously renderBackground() was also being called but I removed it from the post So now to be clear and state the actual problem. Everything is working completely as intended except that the texture is render in an improper scale (1 pixel correlates for many more when rendered for some reason) Thanks again
  21. Looking at the log you are either using an unsupported version or have the wrong JDK version installed. I'm not sure what caused the issues with the mixins but if you are using a supported version u won't be able to do anything regardless unless you get the JDK for Java 17.
  22. Hi, I am working on a battery icon on a screen that displays the amount of energy is stored in the related BlockEntity. To do this I made a widget and overrided the render method to fit my needs. I use a separate texture so I don't have to include it in every texture for screens that are supposed to be using it. My problem is that instead of rendering the texture in the scale of itself it renders in the scale of the background (AKA the gui for that menu without the display). I'm not sure what causes this or how to deal with it. Looking at how it gets blitted the code for drawing it is working as intended. I will provide some images and code below for context https://imgur.com/a/dqHJaZS The first Image is the texture file for reference The second image is a screenshot from ingame (The blocky mess next to the arrow is what is supposed to be the display) The render method @Override public void render(@NotNull PoseStack stack, int MouseX, int MouseY, float p_94672_){ RenderSystem.setShader(GameRenderer::getPositionTexShader); RenderSystem.setShaderTexture(0,RL); Minecraft.getInstance().getTextureManager().bindForSetup(RL); RenderSystem.clearColor(1.0F, 1.0F, 1.0F, 1.0F); //blits the battery Background Minecraft.getInstance().screen.blit(stack,x,y,0,0,this.width,this.height); int energy = menu.getEnergy(); int maxEnergy = menu.getMaxEnergy(); int chargeLevel = (int) Math.ceil((float)energy/maxEnergy*16); //blits the charge Minecraft.getInstance().screen.blit(stack,x+2,y+18-chargeLevel,this.width+(chargeLevel/4-1)*9,16-chargeLevel,9,chargeLevel); } The where the widget gets added (In the screen class) @Override public void render(@NotNull PoseStack stack, int mouseX, int mouseY, float Ptick) { this.addRenderableWidget(new BatteryDisplay(this.getGuiLeft()+82,this.getGuiTop()+37,this.menu)); //... } Thanks for the help!
  23. Hi, I want to synchronize some data from a container between server and client to display to the screen. I have been told that ContainerData is the best way of doing this but I have yet been unsuccessful implementing it. I have tried to use the same method as in the AbstractFurnaceBlockEntity, AbstractFurnaceMenu and AbstractFurnaceScreen classes. Here is some important code. The ContainerData Instance protected final ContainerData dataAccess = new ContainerData() { public int get(int index) { switch(index) { case 0: return AutomatedProcessingBlockEntity.this.Progress; case 1: return AutomatedProcessingBlockEntity.this.Goal; default: return 0; } } public void set(int index, int value) { switch(index) { case 0: AutomatedProcessingBlockEntity.this.Progress = value; break; case 1: AutomatedProcessingBlockEntity.this.Goal = value; break; } } public int getCount() { return 2; } }; Where the affected values are updated (Yes it is being called because the items are being crafted) public void tickServer(BlockState state) { if (getRecipe().isPresent() && (PreviousRecipe==null || PreviousRecipe.isEmpty() || getRecipe().get() != PreviousRecipe.get())) { Goal = getRecipe().get().ticks; } PreviousRecipe = getRecipe(); if(energyStorage.hasSufficientPower() && getRecipe().isPresent()){ Progress++; if(Progress>=Goal){ Progress = 0; finishProduct(); } energyStorage.consumeEnergy(1); }else{ Progress = 0; } } The Class of the menu public abstract class AutomatedProcessingMenu extends ProcessingMenu { protected final ContainerData data; public AutomatedProcessingMenu(int ID, Inventory inv, BlockEntity entity, MenuType<?> container, int Size, Block block, ContainerData data) { super(ID, inv, entity, container, Size, block); this.data = data; } public int getProgress(){ return data.get(0); } public int getGoal(){ return data.get(1); } } And finally where the data is actually used on the client in a screen @Override protected void renderLabels(PoseStack matrixStack, int p_97809_, int p_97810_) { drawString(matrixStack, Minecraft.getInstance().font, menu.getProgress()+"/"+menu.getGoal(), 10, 10, 0xffffff); LogManager.getLogger().debug(menu.getProgress()+"/"+menu.getGoal()); super.renderLabels(matrixStack, p_97809_, p_97810_); } Am I doing something wrong in any of the code or is there something else causing it not working? Thanks for the help!
  24. Hi, I am working on a machine that crafts items in given amount of ticks. I want to display the progress of the crafting on the screen but to do that I need to get the values stored on the blockentity at the server side. I know I can use SimpleChannels and sending packets that way but it seems a little inefficient to send a packet every single tick (I can optimize it but it will still be sent very often.) Do any of you know more efficient methods of doing this or do I use the method written above?
  25. Hey Everyone, I have an effect where you are unable to sleep. As of now it just says "You can sleep only at night or during thunderstorms" but I want to give it a custom message. However to do that I need to add a value to an enum (BedSleepingProblem) which I have no clue how to do it and if it is even possible.
×
×
  • Create New...

Important Information

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