Jump to content

Tablock_

Members
  • Posts

    27
  • Joined

  • Last visited

Tablock_'s Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I am not sure exactly what is causing this crash. It could be possible that you have too many mods and that is overwhelming your computer's memory, or some mods are conflicting with each other. The CurseForge app has a feature that allows you to disable mods. Open the profile of your modpack and you will see an option on the right-hand side to deactivate specific mods. I recommend disabling mods until the game runs. Then, slowly activate them until you find the mods causing the crash.
  2. Are you still getting an OutOfMemoryError? You may have to just remove random mods until the game stops crashing, and go from there. Or you can send me the new crash report and I can try to see what's wrong.
  3. I looked at the crash report again and it looks like the crash is occurring with a mod named "Xaero's World Map." You also have a mod installed called "Xaero's Minimap." Try removing one or both of these mods and see if it worked. If this is the problem, you can try using the JourneyMap mod instead, which is similar to Xaero's Minimap.
  4. You should try allocating more memory to Minecraft, hence the "OutOfMemoryError." If you are using the CurseForge app to make your server: Go to the homepage and click on the settings icon in the bottom left corner. Select "Minecraft" Scroll to the bottom of the page and increase the allocated memory by dragging the slider. If you are not using the CurseForge app: Open the Minecraft launcher Click on "Installations" Edit the installation containing your modded server. Click on "More Options" Look for the text field underneath "JVM Arguments" and paste the following: -Xmx"INSERT_MEMORY_HERE"G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M Replace "INSERT_MEMORY_HERE" with your desired amount of memory to allocate (including the quotations). Try to double or triple the previous amount of memory first. Adding too much memory may cause issues as well. If this does not work, you may have mods that are conflicting with one another.
  5. I would like to create blocks that switch between different models without using block states. I am creating a mod that improves the speed of redstone, and limiting block updates and placements is crucial for large redstone contraptions. Block states require an entirely new block to be placed to function, which I want to avoid. I have developed a method that determines what model I want to render for each particular block via a HashMap. The problem I am having is rendering these models as they change. Imagine a lever connected to a redstone lamp using 5 redstone dust. After flipping the lever, I wish to change the models of each redstone dust and lamp without using block states. A redstone contraption with thousands of redstone dust, torches, etc. will cause lag and may approach the block update limit. Is there a way to do this? It does not matter whether it is possible client-side only or not. The compass item can switch between models, and I was wondering if this is also possible with blocks. If it's impossible, I will resort to block states, only updating the blocks close to the player.
  6. I am creating a custom block by extending the 'Block' class and noticed that many of the methods inside this class are depreciated. For example, 'getShape,' 'canSurvive,' 'use,' and many others are depreciated. Many of these methods are very useful for me. However, I am hesitant to use them because of their depreciated status. Are there alternative ways to accomplish what these methods do? Also, if there is documentation on various alternatives that would be greatly helpful.
  7. I am creating a custom block by extending the 'Block' class and noticed that many of the methods inside this class are depreciated. For example, 'getShape,' 'canSurvive,' 'use,' and many others are depreciated. Many of these methods are very useful for me. However, I am hesitant to use them because of their depreciated status. Are there alternative ways to accomplish what these methods do? Also, if there is documentation on various alternatives that would be greatly helpful.
  8. Thank you so much! That was exactly what I was looking for. This is going to make my life so much easier.
  9. I'm not sure how to explain what I'm having a problem with if you couldn't tell by the title, so I will just give an example. The following is in the Block class. public void fallOn(Level p_152426_, BlockState p_152427_, BlockPos p_152428_, Entity p_152429_, float p_152430_) { p_152429_.causeFallDamage(p_152430_, 1.0F, DamageSource.FALL); } All of the parameters are named starting with the letter 'p' then a sequence of numbers. I heard that there is a way to fix this, but I don't know how. Do you know?
  10. This is not true, Class$forName has nothing to do with the way I registered things. It has to do with the fact that I did not call DeferredRegister$register in the ID class. I could have also made the DeferredRegister fields private in the ID class. Anyway, thank you for answering all of my questions and giving me all of your help.
  11. Got it, its changed now. This was to load the ID class so that all of those static fields were initialized before I called DeferredRegister$register(IEventBus bus). I removed that now and replaced it with a new method I created: ID$init(). This did it! But I have a couple questions on why this works. Why do I need to check if its server side? Isn't it already server side only? What exactly is ServerPlayer? I see that it extends Player, but what's the difference? Is ClientboundSetPassengersPacket telling the client that the entity is riding the player? Thanks as always.
  12. That makes sense. I did that and the Carrier entity renders correctly with no error now. However, entities still do not ride the player correctly after being hit with the Carrier projectile. Again, the server knows that the entity is riding the player, but the client is clueless. I created a github repository, here it is: https://github.com/Tablocked/MyFirstMod. Hopefully you can see it with no issues. I set up my entity renderer in a class named Client. I already showed you every other class that you should need.
  13. I have tried to follow what you have asked of me, but I get this error: Cannot invoke "net.minecraft.client.renderer.entity.EntityRenderer.shouldRender(net.minecraft.world.entity.Entity, net.minecraft.client.renderer.culling.Frustum, double, double, double)" because "entityrenderer" is null I have registered a new entity like so: public static final RegistryObject<EntityType<Carrier>> CARRIER = ENTITIES.register("entity_carrier", () -> EntityType.Builder.<Carrier>of(Carrier::new, MobCategory.MISC).sized(0.25F, 0.25F).clientTrackingRange(4).updateInterval(10).build("entity_carrier")); Please disregard how messy this is. I would like to get it working first. This is my custom entity class: public class Carrier extends ThrowableItemProjectile { public Carrier(EntityType<Carrier> entityType, Level level) { super(entityType, level); } public Carrier(Level level) { super(Main.CARRIER.get(), level); } @Override public Packet<?> getAddEntityPacket() { return NetworkHooks.getEntitySpawningPacket(this); } @Override protected void onHitEntity(EntityHitResult entityHitResult) { entityHitResult.getEntity().startRiding(getOwner()); } @Override protected Item getDefaultItem() { return ID.ENTITY_CARRIER.getItem(); } } And if you need it, my item class: public class EntityCarrier extends Item { public EntityCarrier() { super(ID.newItemProperties()); } @Override public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand interactionHand) { ItemStack itemStack = player.getItemInHand(interactionHand); player.playSound(SoundEvents.BONE_BLOCK_PLACE, 0.5F, 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)); if(!level.isClientSide) { Carrier carrier = new Carrier(level); carrier.setItem(itemStack); carrier.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 1.5F, 1.0F); level.addFreshEntity(carrier); } return InteractionResultHolder.consume(itemStack); } } My entries will be in the same class and be private. I am trying to get it working first then clean up. No I didn't handle getOwner() yet. I also didn't make a git repo yet, I understand how much easier that will make this. I will try to set it up before you hear back from me.
  14. I do not have a git repo, unfortunately. That is a good idea though, I will be creating one in the future. But since I'm running low on time at the moment I will give you it here directly. Note that ID$newItemProperties() just returns new Item.Properties().tab(Main.MOD_TAB). public class EntityCarrier extends Item { public EntityCarrier() { super(ID.newItemProperties()); } @Override public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand interactionHand) { ItemStack itemStack = player.getItemInHand(interactionHand); player.playSound(SoundEvents.BONE_BLOCK_PLACE, 0.5F, 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)); if(!level.isClientSide) { Carrier carrier = new Carrier(level, player); carrier.setItem(itemStack); carrier.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 1.5F, 1.0F); level.addFreshEntity(carrier); } return InteractionResultHolder.consume(itemStack); } } public class Carrier extends Snowball { public Carrier(Level level, LivingEntity player) { super(level, player); } @Override protected void onHitEntity(EntityHitResult entityHitResult) { entityHitResult.getEntity().startRiding(getOwner()); } } And if you need it, this is how I am registering EntityCarrier: public static final RegistryObject<Item> ENTITY_CARRIER = Main.ITEMS.register("entity_carrier", () -> new EntityCarrier()); Do you think this isn't working because I need to create my own entity type? I'm stumped. If you would like anything else please let me know.
×
×
  • Create New...

Important Information

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