Everything posted by poopoodice
-
[1.14.4] Stripped Logs help [SOLVED]
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.
-
What Replaced EntityLivingBase in 1.14
yeah you're right
-
What Replaced EntityLivingBase in 1.14
It seems like EntityLiving is now MobEntity, and EntityLivingBase is now LivingEntity
-
Blocks being rendered like they are completely solid (1.15.1)
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.
-
disable item transfer (by number keys at the top) in a container
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.
-
Problem with Crop Drops
The log should tell you where went wrong
-
Custom Slime block rendering issue
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
where do you override it?
-
[1.14.4]Need help finding problem for TileEntities
You should use your own modid?
-
[SOLVED][1.15.2] Few clicks on a block before doing something
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
I think so, and I'd recommend master-slave system
-
registering client only commands
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
-
registering client only commands
Thank you.
-
registering client only commands
I'm now using FMLServerStartingEvent to register other commands and they worked fine, what are the ways to register a client-only command?
-
Swapping ItemStacks in Inventory
I'm not really sure about this, but the problem might be that Minecraft mc = Minecraft.getMinecraft(); it's only for client side use
-
Swapping ItemStacks in Inventory
Where does that mc came from?
-
Problems about bullets
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
you can have a look at vanilla lectern
-
please build a warehouse in China
It could be the Chinese government's problem? Probably
-
What packet should I return in an entity class that only extends Entity?
Sorry for doing that, appreciate for ur patient ?
-
What packet should I return in an entity class that only extends Entity?
https://github.com/poopoodice/ava/tree/master/src/main/java/com/poopoodice/ava Link to the repo
-
What packet should I return in an entity class that only extends Entity?
Registry.ENTITY_TYPES.register(FMLJavaModLoadingContext.get().getModEventBus()); In the constructor of the main class
-
[1.15.2] How to make occasionally animations?
I'm pretty sure the animations are basically the rotations and the movements of the boxes of the entity model according to their statue.
-
What packet should I return in an entity class that only extends Entity?
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?
https://stackoverflow.com/questions/11247793/why-do-some-folks-use-classmethod-instead-of-class-method-in-correspondence
IPS spam blocked by CleanTalk.