Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. If you look at his most recent code. He doesn't override the tick method at all and it goes back into the super classes tick method which is RedstoneOreBlock::tick The Cactus blocks Collision is slightly bigger than what is visual and thus allows the player to move ever so slightly inside of it and that is what is considered a collision. Take a look at CactusBlock for how it does that.
  2. Why? It's your code you can manipulate it any way you want. You can't do that using the forge config system.
  3. Use the SpriteRenderer I dislike it when people cherry pick lines from the log/console. Was this the whole error? Was there a "Caused by..." line? But this error sounds like the Entity being spawned on the Client wasn't your entity and instead a Pig was spawned. This happens when an Entity of an unregistered EntityType is requested to spawn. Which means your EntityType you are using was not registered. Which leads me to this. This is not how registration works. EntityTypes are singleton values. You can't just create another one and expect it to work. You have to use the instance that you registered. Typically this is done with the @ObejctHolder annotation. You can read the documentation here.
  4. Honestly I'm not sure. Try setting some breakpoint and debugging it.
  5. Depends on what exactly you want to do. Each Model is made of a collection of ModelRenderers each are a rectangular prism and have their own rotations. So yes you can rotate each "limb". But those limbs are strictly speaking limited. IE for a player a leg is one limb you can't bend it in the middle. Honestly just write the Model class yourself. But if you really need to use a program(visual way) there are plenty out there. Also you should use the RenderPlayerEvent. Events are documented here. What you want to do is cancel the event and render your own model under the circumstances that it should be rendered IE. if (playerIsSitting()) { // Cancel Event // Render Sitting Player }
  6. Because they only tick when you tell them to tick. And you only ever tell them to tick when they become activated.
  7. Yes you definitely don't want to have your Block tick randomly.
  8. My bad forgot your activate method was static. You have the BlockState parameter use BlockState::getBlock
  9. What are you talking about? You have access to the Block object already. Use the "this" keyword.
  10. I'm not sure. If I had more time I could look into it. Why not look into it yourself
  11. Sorry 1.12.2 is no longer supported on this forum due to it's age. Please update to a more modern version of Minecraft. For more information check out the link at the top of the page about Forge's LTS.
  12. ITickList is a generic class so what you really want is ITickList<Block> And thus itemIn becomes Block instead of Object.
  13. It's random because when the Blocks.REDSTONE_ORE instance is created it looks like this new RedstoneOreBlock(Block.Properties.create(...).tickRandomly()...)... That tick randomly lets the game know to call the tick function randomly. Show all of your code.
  14. It looks like the easiest way to do this would be to add a feature to your biome(s) that replace all of the Stone blocks with whatever block you want. However if you feel adventurous feel free to look into GenerationSettings::defaultBlock and changing that between the block that you want to use and the vanilla Stone block.
  15. In the call to ITickList::scheduleTick. I'm not sure what you are saying here.
  16. World::getPendingBlockTicks returns an ITickList Then use ITickList::scheduleTick(BlockPos, Block, numberOfTicks) Then override the Block::tick in your Block class. The world will call this method when the numberOfTicks have passed or more ticks have passed.
  17. What actually is your current problem?
  18. Why are you sending the texture to the server anyways? The server doesn't deal with assets at all. Are you trying to make this image the same across all players? What exactly are you trying to do. Why are you needing to generate an image? More specifically why can't this be done before runtime? What is the exact thing you want to do from a users perspective?
  19. Recipes dont go in the assets folder. They go in the data folder. If that doesnt fix it could you post your code as a github repo so it can be tested locally?
  20. Put the logic into the WorldSavedData class?
  21. Yes there is a system in Minecraft/Minecraft Forge called tags. Items, Blocks, entities, and fluids can be tagged together. There is a sapling one. To retrieve the tag do BlockTags.TAG_NAME.
  22. You don't, at least not anymore. Instead you create an Item for each of them and typically a block for each of them.
  23. Wait what? The ArrayList should be in your WorldSavedData class. Use a ListNBT to store a "list" of Items.
  24. Then that is a problem in it of itself. Solve the root of the problem not the visible one. Actually even this is not a problem both experimentally and in the code. Because when a slot is clicked while it does call mergeItemstack later on it still calls Container::detectAndSendChanges on ServerPlayerNethandler 1201.
×
×
  • Create New...

Important Information

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