-
Mixin not working when in distribution environment [1.20.1]
I have made a mixin for the BlockEntity class for the purposes of the mod and it works just fine in the dev environment. However when i build the mod it stops working. I think it is important to mention that i a have a lot of other mixins that do in fact work in the distribution. Here is the problematic mixin: @Mixin(BlockEntity.class) public abstract class BlockEntityMixin implements IBlockEntity { @Shadow BlockEntityType<?> type; @Nullable BlockEntityType<?> overridenType; @Override public void setType(BlockEntityType<?> type) { this.overridenType = type; } public BlockEntityType<?> getType() { return overridenType == null ? this.type : this.overridenType; } }
-
[1.20.x] Load non procedural worlds
I want to add a custom dimension to my mod that is not randomly generated. I want this world to be a void world with a huge island I have created. I don't want to use jigsaw and structure blocks for this as the island does not have procedural elements and is very large (500x500 blocks). I have taken a look at the end dimension which has a big island in the center but I haven't figured out how to do it myself.
-
Help with registering ArgumentType
Hi, i'm making a new command which requires a new argumentType called StringPlusArgumentType. I have effectively copied StringArgumentType and only changed it so '=' is considered a valid character. I'm having trouble registering it. public static final DeferredRegister<ArgumentTypeInfo<?,?>> ARGUMENT_TYPES = DeferredRegister.create(ForgeRegistries.COMMAND_ARGUMENT_TYPES, MODID); public static final RegistryObject<ArgumentTypeInfo<?,?>> STRING_PLUS_ARGUMENT_TYPE = ARGUMENT_TYPES.register("string_plus", () -> new StringPlusArgumentSerializer()); And then: ARGUMENT_TYPES.register(modEventBus); MinecraftForge.EVENT_BUS.register(this); But when i try to join a world it crashes with the message "Invalid player data" Crash log: java.lang.IllegalArgumentException: Unrecognized argument type string() (class me.aes123.commands_plus.commands.StringPlusArgumentType) at net.minecraft.commands.synchronization.ArgumentTypeInfos.byClass(ArgumentTypeInfos.java:155)
-
Help with ItemStack values across classes [1.16.1]
Im relatively new to modding too but i think you can pass the itemstack from the xpball constructor
-
Biomes [1.16]
I am unable to find how to make biomes generate in the overworld in 1.16. Any help would be appreciated.
-
Help storing data with TileEntites[1.16]
Found it thanks so much for the help
-
Help storing data with TileEntites[1.16]
In 1.16 TileEntity class doent have the read fucn and i cant seem to find any way to save data with TileEntities. Any help how to do it?
-
[1.14.4] onBlockActivated deprecated
Hey im having the same problem, could you send me the code which fixed the issue?
-
Help with events (minecraft 1.15.2)
Nevermind, i changed the event to BreakEvent and i modified this line to be like this player.getEntityWorld().setBlockState(e.getPos().add(0,0,0), Blocks.STONE.getDefaultState()); and it works fine. Thanks anyways
-
Help with events (minecraft 1.15.2)
player.getEntityWorld().setBlockState(e.getPos(), Blocks.STONE.getDefaultState()); This part doesnt work.
-
Help with events (minecraft 1.15.2)
I just tried that but it didnt work.
-
Help with events (minecraft 1.15.2)
Having trouble understanding why this piece of code doesnt work. It's meant to replace the ruby_ore when mined by player to stone. Note : it doesnt throw any errors. package com.aes123.atomicrevolution.events; import com.aes123.atomicrevolution.AtomicRevolution; import com.aes123.atomicrevolution.util.BlockInit; import net.minecraft.block.Blocks; import net.minecraft.entity.player.PlayerEntity; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.event.entity.living.LivingDestroyBlockEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent @Mod.EventBusSubscriber(modid = AtomicRevolution.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class PlayerBrokeIronEvent { @SubscribeEvent public static void playerBrokeRubyOre(LivingDestroyBlockEvent e) { if(e.getEntityLiving() instanceof PlayerEntity){ PlayerEntity player = (PlayerEntity) e.getEntityLiving(); if(e.getState().getBlock() == BlockInit.ruby_ore){ player.getEntityWorld().setBlockState(e.getPos(), Blocks.STONE.getDefaultState()); } } } } Thanks in advance
IPS spam blocked by CleanTalk.