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

Haydenman2

Members
  • Posts

    39
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Calgary, Canada
  • Personal Text
    Plz, am n0b, snd halp.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Haydenman2's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. So something along the lines of forge:fluids/oil may be considered appropriate as I would want my oil to be interoperable?
  2. Thank you for pushing me in the right direction. Now I more understand how to manage and utilize fluid tags. Now, one more question, is it proper/typical to tag the fluid under Minecraft, Forge, or my mod's namespace?
  3. In that case, removing the fluid from the water (or lava) tag also removes the physics and allows me to walk freely through the fluid. The water tag is the only way I have found to make the fluid act as a disruptor to player movement.
  4. Hello, I have created a handful of fluids for my mod, and I got to the functionality and physics of a fluid by adding it to the minecraft:fluid/water tag. The issue is, this causes the fluid to work in various machines I do not want it working in, not to mention the water bubbles and other undesired results of tagging it as water. Is there a way to have it physically behave the same as water without any of the side effects of being water internally? Fluid Class Registry Any help would be appreciated. I have tried copying logic from Entity/LivingEntity to no avail.
  5. Thank you! Thank you very much. I appreciate your advice and using it I can now diagnose myself using the stack trace. Thank you again.
  6. This is what I did, so I might have done it wrong. Debug Log
  7. I confirmed that this log provides the same info when it matters, upon player join. Nothing additional could be learned from adding this. The paste is too large to post.
  8. Hi y'all, I'm reaching out because I'm truly at a loss on why this isn't working. I just built my mod on 1.16.1 for the first time to test with my friend, but neither of us can connect, getting booted on join. I have narrowed it down to being an issue with my mod, as we can join a Forge server with no mods on it. The connection in-game shows: Internal Exception: io.netty.handler.codec.DecoderException: io.netty.handler.codec.EncoderException: java.io.UTFDataFormatException: malformed input around byte 83 However I cannot find this in either server or client log at all. Any advice on this issue? Server Log Client Log GitHub
  9. Howdy y'all, I'm trying to use GL scaling to render small versions of text on a custom-rendered ItemStack, however, this is not working nearly how I want it to. It's very close, however, the text is appearing behind the stack. Any idea why? @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { super.drawGuiContainerForegroundLayer(mouseX, mouseY); if(tsfm.storedItem == null) { this.font.drawString("Empty", 52, 13, 0xffffff); }else { this.font.drawString(tsfm.storedItem.getName().getFormattedText(), 52, 13, 0xffffff); if(tsfm.internalStored < 10_000_000) { this.font.drawString("Stored: " + Formatting.GENERAL_FORMAT.format(tsfm.internalStored), 52, 25, 0xd4d4d4); }else { this.font.drawString("Stored: " + SCINOT.format(tsfm.internalStored), 52, 25, 0xd4d4d4); } RenderSystem.pushMatrix(); RenderSystem.scalef(0.5f, 0.5f, 0.5f); this.itemRenderer.renderItemOverlayIntoGUI(this.font, tsfm.storedItem.getDefaultInstance(), (25)*2, (68)*2, "Hello!"); RenderSystem.popMatrix(); } } @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY); int x = (this.width - this.xSize) / 2; int y = (this.height - this.ySize) / 2; if(tsfm.storedItem != null) { this.itemRenderer.renderItemIntoGUI(tsfm.storedItem.getDefaultInstance(), (x+17), (y+60)); } } I have tested it, and rendering ItemOverlayIntoGUI works correctly and places on top of the item as proper when scaling is not involved. EDIT: I actually got it all worked out. Thank you.
  10. Hi all, I've been piecing through the 1.16 update and all is well so far, however I have not been able to find a replacement for these two fields on the Block.Properties options. Any advice?
  11. My advice is to start by reading through the Getting Started, Concepts, and Blocks on the Forge docs to get to the point in which you will be able to put in a custom block. https://mcforge.readthedocs.io/en/1.15.x/blocks/blocks/ Edit: My bad. Accidentally linked the 1.14 docs.
  12. What point are you up to? Have you only made the model? Do you have anything set up in a dev workspace?
  13. Override Item#initCapabilities. In there, return a new ICapabilityProvider, essentially a wrapper for the getCapability method. Then, perform ItemStack#getCapability to query the ICapabilityProvider from the Item class. Here's an example from my code. @Override public ICapabilityProvider initCapabilities(ItemStack stack, CompoundNBT nbt) { return new ICapabilityProvider() { protected IEnergyStorage energy = new IEnergyStorage() { @Override public int receiveEnergy(int maxReceive, boolean simulate) { if (getMaxPower() < maxReceive + getCurrentPower(stack)) { maxReceive = getMaxPower() - getCurrentPower(stack); } if (simulate == false) { setCurrentPower(stack, getCurrentPower(stack) + maxReceive); } return maxReceive; } @Override public int getMaxEnergyStored() { return getMaxPower(); } @Override public int getEnergyStored() { return getCurrentPower(stack); } @Override public int extractEnergy(int maxExtract, boolean simulate) { return 0; } @Override public boolean canReceive() { return true; } @Override public boolean canExtract() { return false; } }; protected LazyOptional<IEnergyStorage> energyHandler = LazyOptional.of(() -> energy); @Override public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) { return this.getCapability(cap); } @Override public <T> LazyOptional<T> getCapability(Capability<T> cap) { if (cap == CapabilityEnergy.ENERGY) { return energyHandler.cast(); } return LazyOptional.empty(); } }; }
  14. I've tried fiddling with filtering through each quad, and no luck sadly with anything. I ended up just simplifying the model significantly. Thank you for the advice.
  15. Hello, I am trying to finish the model for a basic tank block, however despite my best efforts the tanks have very odd shadows being cast. I have tried everything I can think of to get this gone however nothing is working. Any advice for any way I might be able to overcome the strange shading? private static final VoxelShape SHAPE = Stream.of(Block.makeCuboidShape(0, 0, 0, 16, 1, 16), Block.makeCuboidShape(0, 1, 15, 1, 15, 16), Block.makeCuboidShape(15, 1, 15, 16, 15, 16), Block.makeCuboidShape(0, 1, 0, 1, 15, 1), Block.makeCuboidShape(15, 1, 0, 16, 15, 1), Block.makeCuboidShape(0, 15, 0, 16, 16, 16), Block.makeCuboidShape(1, 1, 0, 15, 15, 1), Block.makeCuboidShape(1, 1, 15, 15, 15, 16), Block.makeCuboidShape(1, 1, 1, 15, 15, 15), Block.makeCuboidShape(0, 1, 1, 1, 15, 15), Block.makeCuboidShape(15, 1, 1, 16, 15, 15)).reduce((v1, v2) -> { return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR); }).get(); private static final DecimalFormat FORMAT = new DecimalFormat("###,###,###"); private final int _capacity; private final TemperatureResistance _tempres; public BlockFluidTank(int capacity, TemperatureResistance resist) { super(Block.Properties.create(Material.GLASS).notSolid().hardnessAndResistance(4f, 15f).harvestLevel(0) .harvestTool(ToolType.PICKAXE).sound(SoundType.GLASS).variableOpacity()); _capacity = capacity; _tempres = resist; this.setDefaultState(this.stateContainer.getBaseState().with(StateProperties.FLUID, DisplayFluids.NONE)); } @Override public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) { if (state.getBlock() != newState.getBlock()) { if (worldIn.getTileEntity(pos) instanceof TEFluidTank) { worldIn.removeTileEntity(pos); } } } @Override public boolean isNormalCube(BlockState state, IBlockReader worldIn, BlockPos pos) { return false; } RenderTypeLookup.setRenderLayer(getBlock("steel_fluid_tank"), RenderType.getCutout()); RenderTypeLookup.setRenderLayer(getBlock("wooden_fluid_tank"), RenderType.getCutout()); { "parent": "block/cube", "textures": { "0": "block/oak_log", "1": "block/oak_log", "2": "block/glass", "particle": "block/oak_log" }, "elements": [ "elements": [ { "from": [0, 0, 0], "to": [16, 1, 16], "faces": { "north": {"uv": [0, 0, 16, 1], "texture": "#1"}, "east": {"uv": [0, 0, 16, 1], "texture": "#1"}, "south": {"uv": [0, 0, 16, 1], "texture": "#1"}, "west": {"uv": [0, 0, 16, 1], "texture": "#1"}, "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, "down": {"uv": [0, 0, 16, 16], "texture": "#1"} } }, { "from": [0, 15, 0], "to": [16, 16, 16], "rotation": {"angle": 0, "axis": "y", "origin": [8, 23, 8]}, "faces": { "north": {"uv": [0, 0, 16, 1], "texture": "#1"}, "east": {"uv": [0, 0, 16, 1], "texture": "#1"}, "south": {"uv": [0, 0, 16, 1], "texture": "#1"}, "west": {"uv": [0, 0, 16, 1], "texture": "#1"}, "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, "down": {"uv": [0, 0, 16, 16], "texture": "#1"} } }, { "from": [0, 1, 15], "to": [1, 15, 16], "rotation": {"angle": 0, "axis": "y", "origin": [8, 9, 23]}, "faces": { "north": {"uv": [0, 0, 1, 15], "texture": "#0"}, "east": {"uv": [0, 0, 1, 15], "texture": "#0"}, "south": {"uv": [0, 0, 1, 15], "texture": "#0"}, "west": {"uv": [0, 0, 1, 15], "texture": "#0"}, "up": {"uv": [0, 0, 1, 15], "texture": "#0"}, "down": {"uv": [0, 0, 1, 15], "texture": "#0"} } }, { "from": [15, 1, 15], "to": [16, 15, 16], "rotation": {"angle": 0, "axis": "y", "origin": [23, 9, 23]}, "faces": { "north": {"uv": [0, 0, 1, 15], "texture": "#0"}, "east": {"uv": [0, 0, 1, 15], "texture": "#0"}, "south": {"uv": [0, 0, 1, 15], "texture": "#0"}, "west": {"uv": [0, 0, 1, 15], "texture": "#0"}, "up": {"uv": [0, 0, 1, 15], "texture": "#0"}, "down": {"uv": [0, 0, 1, 15], "texture": "#0"} } }, { "from": [0, 1, 0], "to": [1, 15, 1], "rotation": {"angle": 0, "axis": "y", "origin": [9, 9, 8]}, "faces": { "north": {"uv": [0, 0, 1, 15], "texture": "#0"}, "east": {"uv": [0, 0, 1, 15], "texture": "#0"}, "south": {"uv": [0, 0, 1, 15], "texture": "#0"}, "west": {"uv": [0, 0, 1, 15], "texture": "#0"}, "up": {"uv": [0, 0, 1, 15], "texture": "#0"}, "down": {"uv": [0, 0, 1, 15], "texture": "#0"} } }, { "from": [15, 1, 0], "to": [16, 15, 1], "rotation": {"angle": 0, "axis": "y", "origin": [23, 9, 8]}, "faces": { "north": {"uv": [0, 0, 1, 15], "texture": "#0"}, "east": {"uv": [0, 0, 1, 15], "texture": "#0"}, "south": {"uv": [0, 0, 1, 15], "texture": "#0"}, "west": {"uv": [0, 0, 1, 15], "texture": "#0"}, "up": {"uv": [0, 0, 1, 15], "texture": "#0"}, "down": {"uv": [0, 0, 1, 15], "texture": "#0"} } }, { "from": [1, 1, 0], "to": [15, 15, 1], "rotation": {"angle": 0, "axis": "y", "origin": [9, 9, 8]}, "faces": { "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, "down": {"uv": [0, 0, 16, 16], "texture": "#2"} } }, { "from": [1, 1, 15], "to": [15, 15, 16], "rotation": {"angle": 0, "axis": "y", "origin": [9, 9, 23]}, "faces": { "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, "down": {"uv": [0, 0, 16, 16], "texture": "#2"} } }, { "from": [0, 1, 1], "to": [1, 15, 15], "rotation": {"angle": 0, "axis": "y", "origin": [8, 9, 9]}, "faces": { "north": {"uv": [0, 0, 14, 14], "texture": "#2"}, "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, "south": {"uv": [0, 0, 14, 14], "texture": "#2"}, "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, "up": {"uv": [0, 0, 14, 14], "texture": "#2"}, "down": {"uv": [0, 0, 14, 14], "texture": "#2"} } }, { "from": [15, 1, 1], "to": [16, 15, 15], "rotation": {"angle": 0, "axis": "y", "origin": [23, 9, 18]}, "faces": { "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, "up": {"uv": [0, 0, 16, 16], "texture": "#2"}, "down": {"uv": [0, 0, 16, 16], "texture": "#2"} } } ], "groups": [ { "name": "VoxelShapes", "origin": [8, 8, 8], "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] } ] }
×
×
  • Create New...

Important Information

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