Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Posts posted by Animefan8888

  1. 22 minutes ago, imacatlolol said:

    It's not deactivating because you never do anything in your overridden tick method. Deactivate it there.

    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

    5 minutes ago, Drachenbauer said:

    I saw, the cactus uses onEntityCollision to deal damage.

    So i thaught, this one can use it to activate.

    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. 10 minutes ago, KidKoderMod033109 said:

    The whole mod is based upon the logic and requires the logic to be in that class.

    Why? It's your code you can manipulate it any way you want.

     

    10 minutes ago, KidKoderMod033109 said:

    But, I have thought to create a "config" file for each world, would that work/how would I do that?

    You can't do that using the forge config system.

  3. 21 minutes ago, Peerius said:

    The one is with the SpriteRenderer

    Use the SpriteRenderer

     

    23 minutes ago, Peerius said:

    java.lang.IllegalStateException: Invalid entity data item type for field 7 on entity PigEntity['Schwein'/411, l='MpServer', x=-262.54, y=81.56, z=417.63]: old=0(class java.lang.Byte), new=1 air(class net.minecraft.item.ItemStack)

    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.

     

    On 3/20/2020 at 12:39 PM, Peerius said:

    public static final EntityType<CensoredEntity> CENSORED = register();

    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. 5 minutes ago, GarlicBread said:

    Is it possible to edit limb rotation using forge methods, or do I have to make a new model?

    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.

     

    10 minutes ago, GarlicBread said:

    If I have to make a new model, how would you recommend going about doing so?

    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

    }

  5. 2 minutes ago, MarrsI said:

     Minecraft Version: 1.12.2

    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.

  6. 7 minutes ago, Drachenbauer said:

    For the original redstone ore, it goes a bit random, how long it waits until it switches off.

    But that random value is not given in that block class, it´s, where tick is called.

    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.

    8 minutes ago, Drachenbauer said:

    But for me the middle parameter is not Block, it´s Object.

    What must i put there?

    Show all of your code.

  7. 18 minutes ago, SSKirillSS said:

    So I can’t change this block without creating my own dimension?

    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.

  8. 8 minutes ago, Drachenbauer said:

    I´m not sure, how exactly to use World#getPendingBlockTicks.

    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.

  9. 9 hours ago, Pacmandevil said:

    and send it to the server to assign the texture

    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?

     

    9 hours ago, Pacmandevil said:

    Hello! the mod I'm working on requires me to generate an image based on the player's perspective - similar (but not exactly like) a screenshot, in order to be used to generate a texture for a block (or entity, haven't figured out which is ideal to use yet)

    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?

  10. 47 minutes ago, Nurox said:

    Do you know of a less janky way to tell if the ItemEntity is a sapling? I'm still using the .toString().contains(SAPLING) method. I've tried a few other ways, but can't figure it out.

    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.

  11. 52 minutes ago, JithuJilladi said:

    Hey! I'm new to modding and I was just wandering how would you go about making an items with data values like wool:1 or wool:2 and have that make a difference? I have no clue how to handle data values nor create them. Any help would be appreciated! Thanks! ?

    You don't, at least not anymore. Instead you create an Item for each of them and typically a block for each of them.

  12. 1 hour ago, TheGreyGhost said:

    There's also no guarantee that the client side TileEntity will exist if the client and server worlds are slightly out of synch for some reason

    Then that is a problem in it of itself. Solve the root of the problem not the visible one.

    1 hour ago, TheGreyGhost said:

    It looks to me like this vanilla code is directly manipulating the ItemStack, not via the Slot methods for changing/insertion/deletion.  Hence the reason the vanilla code must call onSlotChanged directly.

    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.