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


  • Content Count

  • Joined

  • Last visited

Everything posted by NullDev

  1. So I am creating an entity that functions like an ender pearl, and I have created the entity and registered a renderer, but I cannot find anywhere to register the model. Here is my code: https://github.com/AyliasTheCoder/TheSecretsOfRetexturedMC
  2. For anyone else with this issue, I figured it out. Do this for each new StringTextComponent: toReturn.func_230529_a_( new StringTextComponent("New Text With New Color").func_240701_a_(TextFormatting.WHITE) ) I call the mergestyle on the new StringTextComponent that I am adding with the appendText function.
  3. Sorry it took me so long, but here you go. I am trying to build it block by block from a tileentity. The code for the building is in the OneBlockBuilderTileEntityAbstract class. I currently have my own system implemented, but I'd prefer to use schematics, because those will be easier for complex structures. https://github.com/AyliasTheCoder/OneBlockADayForge
  4. So how would I do it without overriding it?
  5. I changed it to this and it is still all black: StringTextComponent toSend = new StringTextComponent("Info: "); player.sendStatusMessage(toSend.func_240701_a_(TextFormatting.WHITE) .func_230529_a_(new StringTextComponent(ticksRemaining/20 + " | ")) .func_240701_a_(TextFormatting.RED) .func_230529_a_(new StringTextComponent(Integer.toString(redstoneAdded))) .func_240701_a_(TextFormatting.WHITE) .func_230529_a_(new StringTextComponent(" | ")) .func_240701_a_(TextFormatting.GREEN)
  6. I've done that like this, but now it just appears all black IFormattableTextComponent toSend = new StringTextComponent("Info: "); toSend.func_240701_a_(TextFormatting.WHITE) .func_230529_a_(new StringTextComponent(ticksRemaining/20 + " | ")) .func_240701_a_(TextFormatting.RED) .func_230529_a_(new StringTextComponent(Integer.toString(redstoneAdded))) .func_240701_a_(TextFormatting.WHITE) .func_230529_a_(new StringTextComponent(" | ")) .func_240701_a_(TextFormatting.GREEN)
  7. I am having some issues with text formatting. I format my text like this: player.sendStatusMessage(new StringTextComponent(ticksRemaining/20 + " §f| §4" + redstoneAdded + " §f| §a" + emeraldAdded + " §f| §b" + diamondAdded + " §f| §0" + coalAdded), true) and it appears like this in the game chat:
  8. It turns out using TemplateManager manager = world.getServer().func_241755_D_().getStructureTemplateManager(); crashes if its a singleplayer world, even with the !world.isRemote, so how else do I get the TemplateManager? And I think to get the blocks I just do BlockPos temp = new BlockPos(pos.getX(), pos.getY() + 1, pos.getZ()); template.func_215386_a(temp, new PlacementSettings(), Blocks.ACACIA_WOOD, true);
  9. Alright. It seems it uses TemplateManager, and I have figured out how to get that, ang grab a Template using it, but how do I get the blocks from said template? if (!world.isRemote) { TemplateManager manager = world.getServer().func_241755_D_().getStructureTemplateManager(); Template template = manager.getTemplate(new ResourceLocation(ModBase.MODID, "schematics/small_house")); }
  10. I am creating a mod that has blocks that build structures, but I don't want to code in each of the positions for blocks by hand, so I want to use schematics. How would I start going about reading a schematic with forge?
  11. I have created a custom crafting table in my mod, and it extends the "CraftingTableBlock" class. For whatever reason, when I right click on it the gui opens, and then immediately closes. How do I make it not close? Do I need a gui that extends WorkbenchContainer?
  12. No. I have been trying to get the fluid working before I make those. Do I need the mcmeta for the physics to work?
  13. I have modded a fluid into the game, but it does not push entities like water does, nor does it allow the player to float in it. I have tried adding .density(1) and .viscosity(1) in the fluid attributes builder, but it did nothing. There is also nothing in the water class that shows how the player can float in it. My Class: package com.nulldev.modbase.blocks; import com.nulldev.modbase.ModBase; import com.nulldev.modbase.util.CustomFluids; import com.nulldev.modbase.util.RegistryHandler; import net.minecraft.block.BlockState; import net.minecraft.block.FlowingFluidBlock; import net.m
  14. Alright, so I have done that, but I cannot use the same rayTrace method that the bottle uses because it is protected, so how do I find the fluid that was clicked? @SubscribeEvent public static void playerRightClickItem(PlayerInteractEvent.RightClickItem event) { System.out.println("Player Right Clicked!"); World worldIn = event.getWorld(); PlayerEntity playerIn = event.getPlayer(); if (event.getPlayer().getHeldItem(event.getHand()).getItem() == Items.GLASS_BOTTLE) { RayTraceResult raytraceresult = rayTrace(worldIn, playerIn, RayTraceContext.
  15. I have created and registered a fluid, and I want to give entities effects while they are in the fluid, so how do I detect what entities are in the fluid?
  16. I have added and registered a fluid, and I need to detect when the player right clicks the fluid with a bottle, but there is no way to detect that within the class extending FlowingFluid, and if I use onBlockActivated in the class extending FlowingFluidBlock, nothing happens. It seems vanilla Minecraft detects it within the bottle itself, so where would I detect a bottle clicking my fluid at?
  17. I have created a block and added translucence to it using RenderTypeLookup to set its RenderType to RenderType.getTranslucent() but it doesn't render the faces of other blocks it touches. I am doing it like this: private void doClientStuff(final FMLClientSetupEvent event) { RenderType translucent = RenderType.getTranslucent(); RenderTypeLookup.setRenderLayer(RegistryHandler.PINK_SLIME_BLOCK.get(), translucent); } But it looks like this
  18. Turns out it was a problem with IntelliJ. Not sure what, but I restarted it and everything is working fine now.
  19. https://github.com/AyliasTheCoder/The-Secrets-Of-BlocksDrawing
  20. Does this git repo generated by IntelliJ work? That's the only way I know how to make a git repo of it. .git.zip
  21. I have overriden both of them and nothing has changed. They both always return true. @Override public boolean isStickyBlock(BlockState state) { return true; } @Override public boolean canStickTo(BlockState state, BlockState other) { return true; }
  22. I have created a new slime block and it extends the SlimeBlock class, so why doesn't it work with pistons like a normal slime block does? It doesn't pull blocks with it, or bounce the player when it hits them being pushed by the piston. The player bounces fine when landing on it, but that is it. The Class: package com.nulldev.modbase.blocks; import net.minecraft.block.AbstractBlock; import net.minecraft.block.SlimeBlock; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public
  23. I am now registering the colors using that event, but nothing has changed. I even have the event logging to the console to check that it is working. Blockstate: { "variants": { "bites=0": { "model": "tons_of_cakes:block/cake" }, "bites=1": { "model": "tons_of_cakes:block/cake_slice1" }, "bites=2": { "model": "tons_of_cakes:block/cake_slice2" }, "bites=3": { "model": "tons_of_cakes:block/cake_slice3" }, "bites=4": { "model": "tons_of_cakes:block/cake_slice4" }, "bites=5": { "model": "tons_of_cakes:bloc
  24. I register an IBlockColor like this: Minecraft.getInstance().getBlockColors().register(new CakeColor(0xad6b15), block); //Cake color implements IBlockColor and its method The getColor method is setup like this: @Override public int getColor(BlockState p_getColor_1_, @Nullable IBlockDisplayReader p_getColor_2_, @Nullable BlockPos p_getColor_3_, int p_getColor_4_) { return color; // Returns the same color regardless of state } Yet the color of my cake still uses the base texture when placed on the ground. I need the color to change.
  • Create New...

Important Information

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