-
Posts
1160 -
Joined
-
Days Won
7
Everything posted by poopoodice
-
you might want to do them your self, such as override the onBlockActivated in your custom log, check if the player is holding an axe, and either change the block state or set a new block there. I dont know if it's the best way to do it tho.
-
yeah you're right
-
It seems like EntityLiving is now MobEntity, and EntityLivingBase is now LivingEntity
-
Blocks being rendered like they are completely solid (1.15.1)
poopoodice replied to Jipthechip's topic in Modder Support
Block model only gives what the blocks looks like, you will need to create shapes yourself. You can still use the deprecated methods, you can see people discuss with them in lots of past posts, check this: And through voxelshapes you can use them to declare the bounding box of the block, and the box showed to player when player is looking at it also. -
As title, is there a way to prevent player move stacks by using number keys? Here's what I've tried: @Override public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, PlayerEntity player) { return slotId == this.slot ? ItemStack.EMPTY : super.slotClick(slotId, dragType, clickTypeIn, player); } In container class this works well on normal transfer (drag and drop), but not working on the number keys. addSlot(new Slot(playerInv, x, 24 + x * 18, 165) { @Override public boolean canTakeStack(PlayerEntity playerIn) { return false; } @Override public boolean isItemValid(ItemStack stack) { return false; } }); Override these two methods from the Slot class doesn't help with that either. Any hints or something I did not noticed? Thanks.
-
The log should tell you where went wrong
-
Show your Block class as well, and I think add notSolid() to your block property should work.
-
[1.14.4]Need help finding problem for TileEntities
poopoodice replied to DarkAssassin's topic in Modder Support
where do you override it? -
[1.14.4]Need help finding problem for TileEntities
poopoodice replied to DarkAssassin's topic in Modder Support
You should use your own modid? -
[SOLVED][1.15.2] Few clicks on a block before doing something
poopoodice replied to Corgam's topic in Modder Support
You can do it in both ways, but I'll say block state if that's the only thing you want to do. -
[1.15.2] Questions regarding the overhead of tickable tile entities
poopoodice replied to DavidM's topic in Modder Support
I think so, and I'd recommend master-slave system -
I just found another problem about registering client commands (opens a guiscreen). I've tested it in three different situations: 1- single player and it works fine. 2- multiplayers, the world is opened to lan. In this situation all players are able to see and execute the command but only the player that is sharing the world opens gui (even if it's the other players executed the command). 3- multiplayers, the world is hosted by a separated server (I ran runServer), and the players joined are unable to see and execute the command. how I register the command: private void onServerStarting(final FMLServerStartingEvent event) { ModCommands.registerAll(event.getCommandDispatcher(), event.getServer().isDedicatedServer()); } mod commands public static void registerAll(CommandDispatcher<CommandSource> dispatcher, boolean isDedicatedServer) { LiteralArgumentBuilder<CommandSource> command = Commands .literal("test") if (!isDedicatedServer) { command.then(OpenGUICommand.register(dispatcher)); } dispatcher.register(command); } command itself public static ArgumentBuilder<CommandSource, LiteralArgumentBuilder<CommandSource>> register(CommandDispatcher<CommandSource> dispatcher) { return Commands.literal("opengui").executes((context) -> { Minecraft.getInstance().displayGuiScreen(new TestScreen()); return 0; }); } Hope these hints help
-
Thank you.
-
I'm now using FMLServerStartingEvent to register other commands and they worked fine, what are the ways to register a client-only command?
-
I'm not really sure about this, but the problem might be that Minecraft mc = Minecraft.getMinecraft(); it's only for client side use
-
Where does that mc came from?
-
I've created a bullet successfully, but then I found out when the motion reaches a certain number, it is possible for bullets to jump through walls (new pos is basically current pos + motion), but when it is too low, it doesn't act like bullets. The reason I used entity bullet is I want it only reduces damage and range when colliding with terrains instead of stop and self-destruct. Is it possible to that with raytracing as well? If so do I need to rewrite a raytracing method?
-
[1.14.4]How to make multi collision boxes
poopoodice replied to ChAoS_UnItY's topic in Modder Support
you can have a look at vanilla lectern -
It could be the Chinese government's problem? Probably
-
[1.15.2] How to make occasionally animations?
poopoodice replied to DragonITA's topic in Modder Support
I'm pretty sure the animations are basically the rotations and the movements of the boxes of the entity model according to their statue. -
public class Bullet extends AbstractBullet { private float damage; public Bullet(EntityType<? extends Bullet> entityType, World worldIn) { super(entityType, worldIn); } public Bullet(EntityType<? extends Bullet> entityType, World worldIn, PlayerEntity shooter) { this(entityType, worldIn); this.setPosition(shooter.posX, shooter.posY, shooter.posZ); } @Override protected void registerData(){} @Override public IPacket<?> createSpawnPacket() { return NetworkHooks.getEntitySpawningPacket(this); } } public abstract class AbstractBullet extends DamagingProjectileEntity { protected AbstractBullet(EntityType<? extends AbstractBullet> entityType, World worldIn) { super(entityType, worldIn); } @Override public boolean canBeCollidedWith() { return false;} @Override public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_){ return false;} @Override protected boolean isFireballFiery(){ return false;} } Here you are ?
-
How do u check if an inventory slot contains 64 items?
poopoodice replied to didi1150's topic in Modder Support
https://stackoverflow.com/questions/11247793/why-do-some-folks-use-classmethod-instead-of-class-method-in-correspondence