Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

naturaGodhead

Members
  • Posts

    63
  • Joined

  • Last visited

Posts posted by naturaGodhead

  1. Hi everyone, 

     

    I'm using the following code to open an enderchest via an item. However it seems like the inventories aren't synced and it causes ghost items and other glitches.

     

    if(player.world.isRemote) {
    			if(player.isSneaking() && Keyboard.isKeyDown(Keyboard.KEY_SPACE)){
    			
    			EntityPlayer playerE = (EntityPlayer)player;
    			InventoryEnderChest inventoryenderchest = playerE.getInventoryEnderChest();
    			
    			if (inventoryenderchest != null)
    				playerE.displayGUIChest(inventoryenderchest);
    			}
    		}

     

  2. package com.natura.minestuckarsenal;
    
    import java.util.Optional;
    
    import org.lwjgl.input.Keyboard;
    import org.lwjgl.opengl.GL11;
    
    import com.natura.minestuckarsenal.item.ItemLaserWeapon;
    import com.natura.minestuckarsenal.item.MinestuckArsenalItems;
    
    import net.java.games.input.Mouse;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.renderer.BufferBuilder;
    import net.minecraft.client.renderer.GlStateManager;
    import net.minecraft.client.renderer.Tessellator;
    import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
    import net.minecraft.client.settings.GameSettings;
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.util.ResourceLocation;
    import net.minecraft.util.math.Vec3d;
    import net.minecraftforge.client.event.RenderWorldLastEvent;
    import net.minecraftforge.event.entity.player.PlayerInteractEvent.EntityInteract;
    import net.minecraftforge.fml.common.eventhandler.EventPriority;
    import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraftforge.fml.relauncher.SideOnly;
    
    public class ClientEventHandler {
    	
    	public static final ResourceLocation LASER_LOC = new ResourceLocation(MinestuckArsenal.MODID, "textures/effects/laserbeam.png");
    
    	public ClientEventHandler() {
    		
    	}
    	
    	@SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true)
    	public void onRenderWorld(RenderWorldLastEvent e) {
    		
    			EntityPlayer player = Minecraft.getMinecraft().player;
    			GameSettings gs = Minecraft.getMinecraft().gameSettings;
    			
    			if(player.getActiveItemStack().getItem() == MinestuckArsenalItems.ahabsCrosshairs && gs.keyBindUseItem.isKeyDown()) {
    				doRenderBeam(player);
    			}
    		
    		
    	}
    	
    	
    	public static void doRenderBeam(EntityLivingBase shooter) {
    			GlStateManager.depthMask(false);
    			GlStateManager.enableBlend();
    			GlStateManager.blendFunc(GL11.GL_ONE, GL11.GL_ONE);
    			
    			GlStateManager.pushMatrix();
    			
    			EntityPlayer player = Minecraft.getMinecraft().player;
    			
    			float partialTicks = Minecraft.getMinecraft().getRenderPartialTicks();
    			double doubleX = player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks;
    			double doubleY = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks;
    			double doubleZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks;
    			
    			Vec3d vec = new Vec3d(doubleX, doubleY+player.getEyeHeight(), doubleZ);
    			Vec3d vec0 = shooter.getPositionVector().addVector(0, shooter.getEyeHeight()+0.2, 0);
    			Vec3d vec1 = vec0;
    			
    			
    			
    				vec1 = Optional.ofNullable(ItemLaserWeapon.raytraceEntityPlayerLook(player, ItemLaserWeapon.range))
    				.map(rtr -> rtr.hitVec)
    				.orElse(vec1);
    			
    			GlStateManager.translate(-doubleX, -doubleY, -doubleZ);
    			
    			Tessellator tessellator = Tessellator.getInstance();
    			BufferBuilder buffer = tessellator.getBuffer();
    			
    			Minecraft.getMinecraft().renderEngine.bindTexture(LASER_LOC);
    			
    			buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_LMAP_COLOR);
    			
    			drawBeam(vec0, vec1, vec, 0.13f);
    			
    			tessellator.draw();
    			
    			GlStateManager.popMatrix();
    			
    			GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    			
    	}
    	
    	
    	public static void drawBeam(Vec3d S, Vec3d E, Vec3d P, float width) {
    		Vec3d PS = S.subtract(P);
    		Vec3d SE = E.subtract(S);
    	
    		Vec3d normal = PS.crossProduct(SE).normalize();
    	
    		Vec3d half = normal.scale(width);
    		Vec3d p1 = S.add(half);
    		Vec3d p2 = S.subtract(half);
    		Vec3d p3 = E.add(half);
    		Vec3d p4 = E.subtract(half);
    	
    		drawQuad(Tessellator.getInstance(), p1, p3, p4, p2);
    	}
    
    	
    	private static void drawQuad(Tessellator tessellator, Vec3d p1, Vec3d p2, Vec3d p3, Vec3d p4) {
    		int brightness = 240;
    		int b1 = brightness >> 16 & 65535;
    		int b2 = brightness & 65535;
    	
    		BufferBuilder buffer = tessellator.getBuffer();
    		buffer.pos(p1.x, p1.y, p1.z).tex(0.0D, 0.0D).lightmap(b1, b2).color(255, 255, 255, 128)
    			.endVertex();
    		buffer.pos(p2.x, p2.y, p2.z).tex(1.0D, 0.0D).lightmap(b1, b2).color(255, 255, 255, 128)
    			.endVertex();
    		buffer.pos(p3.x, p3.y, p3.z).tex(1.0D, 1.0D).lightmap(b1, b2).color(255, 255, 255, 128)
    			.endVertex();
    		buffer.pos(p4.x, p4.y, p4.z).tex(0.0D, 1.0D).lightmap(b1, b2).color(255, 255, 255, 128)
    			.endVertex();
    	}
    	
    }

     

    This is my rendering code right now, but this never seems to do anything? I have the event handler registered in my main class.

  3. I've added some very simple guns for my mod and want to set a fire rate for them if you're holding down the right mouse button. What would be the best way to do this? I don't want it to happen if you're just clicking once over and over, but only when holding the button down. I tried setting a simple counter but that still happens while single clicking and feels bad to not fire every few clicks.

     

    Relevant method:

     

    @Override
    	public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) {
    		ItemStack itemstack = playerIn.getHeldItem(handIn);
    		
    			if (!playerIn.capabilities.isCreativeMode)
    			{
    				itemstack.damageItem(1, playerIn);
    			}
    		
    			if (!worldIn.isRemote)
    			{
    				EntityBullet entityBullet = new EntityBullet(worldIn, playerIn, projectileDamage);
    				entityBullet.setHeadingFromThrower(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, speed, 0.1F);
    				worldIn.spawnEntity(entityBullet);
    			}
    
    			
    			return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, itemstack);
    		
    	}

     

  4. So I'm working on a feature for my mod. I reference another mod that I'm dependent on in an event handler. I use a method shown below, and while in my IDE the method shows no errors. When I try to build my mod through command prompt with gradlew build, I get an error saying that the the method is not visible.  I've tried cleaning my workspace, deleting and replacing the dependant mod jar, and restarting my computer.

    The error:

    error: getPlayerList() is not public in Session; cannot be accessed from outside package.

     

    Where I reference the method:

    Spoiler
    
    @SubscribeEvent
    	public void onConnectionCreated(ConnectionCreatedEvent e) {
    		if(MinestuckArsenalConfig.connectionGrist) {
    			int grist = 2 * 10^(e.getSession().getPlayerList().size());
    			
    			if(grist >= 2000000000) {
    				grist = 2000000000;
    			}
    			
    			grist = grist - 20;
    			
    			GristHelper.increase(e.getConnection().getClientIdentifier(), new GristSet(GristType.Build, grist));
    			MinestuckPlayerTracker.updateGristCache(e.getConnection().getClientIdentifier());
    		}
    	}

     

     

    Method in question: 

    Spoiler
    
    /**
    	 * Creates a list with all players in the session.
    	 * @return Returns a list with the players identifiers.
    	 */
    	public Set<PlayerIdentifier> getPlayerList()
    	{
    		Set<PlayerIdentifier> list = new HashSet<PlayerIdentifier>();
    		for(SburbConnection c : this.connections)
    		{
    			list.add(c.getClientIdentifier());
    			if(!c.getServerIdentifier().equals(IdentifierHandler.nullIdentifier))
    				list.add(c.getServerIdentifier());
    		}
    		list.addAll(predefinedPlayers.keySet());
    		return list;
    	}

     

     

  5. So I posted the topic a few hours ago about having issues with an addon mod and its item registry replacing items with the same registry name in the other mod. I tried forcing my addon to run before the main mod, which caused the blocks to also get registered using the addon mod's modid. I think this means that the main mod is registering its items AFTER my addon mod, despite my mod being required-after. Is there a way to see if the other mod has already ran its ModItems.class, and then only start running mine once that has finished?

  6. So a bit of background, I've been making an addon mod for Minestuck for around a year now. I have a system of "replacing" items from the main mod by registering new items with the same registry name. It's worked for all intents and purposes until a recent update where the main mod switched the order of registering blocks and items. For some reason, this broke all of my replacement items. I tried to fix them by registering them with the main mod's modid. That fixed the crashing, but now all the items from the main mod are registered under the addon's mod's modid? Despite only four of them being "replacements". This is causing a  lot of headache for me. Any advice would be a big help. I'm not really that good with coding and it takes me a bit to see obvious stuff

     

    Main mod's github:
    https://github.com/mraof/Minestuck/

     

    My items class where everything is instantiated and registered.

    Spoiler
    
    package com.natura.minestuckarsenal.item;
    
    import static com.natura.minestuckarsenal.block.MinestuckArsenalBlocks.*;
    import static com.natura.minestuckarsenal.block.MinestuckArsenalBlocks.uniqueObject;
    
    import com.mraof.minestuck.item.ItemModus;
    import com.mraof.minestuck.item.MinestuckItems;
    import com.mraof.minestuck.item.weapon.ItemCandyWeapon;
    import com.mraof.minestuck.item.weapon.ItemDualWeapon;
    import com.mraof.minestuck.item.weapon.ItemPogoWeapon;
    import com.mraof.minestuck.item.weapon.ItemPotionWeapon;
    import com.mraof.minestuck.item.weapon.ItemSord;
    import com.mraof.minestuck.item.weapon.ItemWeapon;
    
    import net.minecraft.init.MobEffects;
    import net.minecraft.init.SoundEvents;
    import net.minecraft.inventory.EntityEquipmentSlot;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemArmor;
    import net.minecraft.item.ItemBlock;
    import net.minecraft.item.ItemFood;
    import net.minecraft.potion.PotionEffect;
    import net.minecraftforge.common.util.EnumHelper;
    import net.minecraftforge.event.RegistryEvent;
    import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
    import net.minecraftforge.registries.IForgeRegistry;
    
    public class MinestuckArsenalItems {
    	
    	//Items to override from Minestuck
    	public static Item caledfwlch = new ItemWeapon(1200, 25, -2.4D, 30, "caledfwlch").setRegistryName("minestuck", "caledfwlch");
    	public static Item mwrthwl = new ItemWeapon(1200, 25, -2.4D, 30, "mwrthwl").setTool("pickaxe", 4, 5.0F).setRegistryName("minestuck", "mwrthwl");
    	public static Item fearNoAnvil = new ItemPotionWeapon(20000, 16, -2.8D, 50, "fearNoAnvil", new PotionEffect(MobEffects.SLOWNESS, 100, 100)).setTool("pickaxe", 4, 6.0F).setRegistryName("minestuck", "fear_no_anvil");
    	
    	//Instantiate items.
    	public static ItemArmor.ArmorMaterial armorTrollHeadband = EnumHelper.addArmorMaterial("TROLL_HEADBAND", "minestuckarsenal:troll_headband", 50, new int[]{2, 2, 2, 2}, 15, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F);
    	public static ItemArmor.ArmorMaterial armorDirkGlasses = EnumHelper.addArmorMaterial("DIRK_SHADES", "minestuckarsenal:dirk_glasses", 250, new int[] {4, 5,  4,  5}, 15, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F);
    	public static ItemArmor.ArmorMaterial armorDerse = EnumHelper.addArmorMaterial("DERSE", "minestuckarsenal:pajamas_derse", 100, new int[] {2, 6, 4, 2}, 15, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F);
    	public static ItemArmor.ArmorMaterial armorProspit = EnumHelper.addArmorMaterial("PROSPIT", "minestuckarsenal:pajamas_prospit", 100, new int[] {2, 6, 4, 2}, 15, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F);
    	public static ItemArmor.ArmorMaterial armorRocket = EnumHelper.addArmorMaterial("ROCKET", "minestuckarsenal:rocket", 500, new int[] {2, 4, 6, 2}, 4, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F);
    	public static ItemArmor.ArmorMaterial armorIronLass = EnumHelper.addArmorMaterial("IRON_LASS", "minestuckarsenal:iron_lass", 4130, new int[] {4, 10, 8, 4}, 12, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 2.0F);
    	public static ItemArmor.ArmorMaterial armorSuit = EnumHelper.addArmorMaterial("SUIT", "minestuckarsenal:suit", 250, new int[] {1, 4, 5, 2}, 8, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F);
    	public static ItemArmor.ArmorMaterial armorSlimeSuit = EnumHelper.addArmorMaterial("SLIME_SUIT", "minestuckarsenal:slime_suit", 350, new int[] {2, 5, 6, 3}, 10, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F);
    	public static ItemArmor.ArmorMaterial armorWiseguy = EnumHelper.addArmorMaterial("WISEGUY", "minestuckarsenal:wiseguy_slimesuit", 500, new int[] {3, 6, 7, 4}, 14, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F);
    	
    	public static ItemArmor.ArmorMaterial armorSlime = EnumHelper.addArmorMaterial("SLIME", "minestuckarsenal:slime", 150, new int[] {2, 4, 6, 2}, 5, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F);
    	public static ItemArmor.ArmorMaterial armorJadeGlasses = EnumHelper.addArmorMaterial("GLASSES_JADE", "minestuckarsenal:glasses_jade", 100, new int[] {2, 2, 2, 2}, 5, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F);
    	public static ItemArmor.ArmorMaterial armorJohnGlasses = EnumHelper.addArmorMaterial("GLASSES_JOHN", "minestuckarsenal:glasses_john", 100, new int[] {2, 2, 2, 2}, 5, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F);
    	public static ItemArmor.ArmorMaterial armorSoothSpecs = EnumHelper.addArmorMaterial("SOOTH_SPECS", "minestuckarsenal:sooth_specs", 250, new int[] {3, 3, 3, 3}, 15, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F);
    	public static ItemArmor.ArmorMaterial armorDaveGlasses = EnumHelper.addArmorMaterial("GLASSES_DAVE", "minestuckarsenal:glasses_dave", 100, new int[] {2,  2,  2,  2}, 5, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F);
    	
    	
    	//bladeKind
    	public static Item paperSword = new ItemWeapon(65, 2, -2.4D, 15, "paperSword").setRegistryName("paper_sword");
    	public static Item chainsawKatana = new ItemWeapon(850, 10.0D, -2.4D, 15, "chainsawKatana").setRegistryName("chainsaw_katana");
    	public static Item ancestralSword = new ItemWeapon(1200,16.0D, -2.4D, 30, "ancestralSword").setRegistryName("ancestral_sword");
    	public static Item cutlass = new ItemWeapon(260, 6.5D, -2.4D, 8, "cutlass").setRegistryName("cutlass");
    	
    	//1/2bladeKind
    	public static Item brokenNinjaSword = new ItemWeapon(100, 3, -2.4D, 15, "brokenNinjaSword").setRegistryName("broken_katana");
    	public static Item brokenCaledfwlch = new ItemWeapon(800, 24, -2.4D, 28, "brokenCaledfwlch").setRegistryName("broken_caledfwlch");
    	public static Item brokenRoyalDeringer = new ItemWeapon(1200, 15, -2.4D, 28, "brokenRoyalDeringer").setRegistryName("broken_royal_deringer");
    	public static Item brokenScarletRibbitar = new ItemWeapon(1800, 19, -2.4D, 28, "brokenScarletRibbitar").setRegistryName("broken_scarlet_ribbitar");
    	
    	//sickleKind
    	public static Item thornySubject = new ItemWeapon(300, 5.0D, -2.4D, 8, "thornySubject").setRegistryName("thorny_subject");
    	public static Item babysFirstThresher = new ItemWeapon(250, 5, -2.4D, 12, "babysFirstThresher").setRegistryName("babys_first_thresher");
    	public static Item derseReaper = new ItemWeapon(200, 4, -2.4D, 12, "derseReaper").setRegistryName("derse_reaper");
    	public static Item prospitReaper = new ItemWeapon(200, 4, -2.4D, 12, "prospitReaper").setRegistryName("prospit_reaper");
    	public static Item hemeoreaper = new ItemWeapon(550, 9, -2.4D, 15, "hemeoreaper").setRegistryName("hemeoreaper");
    	public static Item owTheEdge = new ItemSord(25, 2, -2.4D, 2, "owTheEdge").setRegistryName("ow_the_edge");
    	
    	//hammerKind
    	public static Item wrinklefucker = new ItemPogoWeapon(500, 9.0D, -2.8D, 12, "wrinklefucker", 0.4).setRegistryName("wrinklefucker");
    	public static Item barberBasher = new ItemWeapon(450, 7.0D, -2.8D, 11, "barberBasher").setRegistryName("barber_basher");
    	
    	//needleKind
    	public static Item knittingNeedles = new ItemWeapon(150, 3, -1.8D, 6, "knittingNeedles").setRegistryName("knitting_needles");
    	public static Item needleWands = new ItemWeapon(250, 7, -1.8D, 15, "needleWands").setRegistryName("needle_wands");
    	public static Item thornsOfOglogoth = new ItemWeapon(400, 15, -1.8D, 16, "thornsOfOglogoth").setRegistryName("thorns_of_oglogoth");
    	public static Item quillsOfEchidna = new ItemWeapon(750, 60, -1.8D, 18, "quillsOfEchidna").setRegistryName("quills_of_echidna");
    	
    	
    	//Guns to be added later.
    	//pistolKind
    	public static Item beretta = new Item().setRegistryName("beretta").setUnlocalizedName("beretta").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item goldBeretta = new Item().setRegistryName("gold_beretta").setUnlocalizedName("goldBeretta").setCreativeTab(MinestuckItems.tabMinestuck);
    		
    	//rifleKind
    	public static Item huntingRifle = new Item().setRegistryName("hunting_rifle").setUnlocalizedName("huntingRifle").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item girlsBestFriend = new Item().setRegistryName("girls_best_friend").setUnlocalizedName("girlsBestFriend").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item greenSunStreetSweeper = new Item().setRegistryName("green_sun_street_sweeper").setUnlocalizedName("greenSunStreetSweeper").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item ahabsCrosshairs = new Item().setRegistryName("ahabs_crosshairs").setUnlocalizedName("ahabsCrosshairs").setCreativeTab(MinestuckItems.tabMinestuck);
    	
    	//bowKind
    	
    	
    	//tridentKind
    	public static Item woodenTrident = new ItemWeapon(150, 4, -2.5D, 4, "woodenTrident").setRegistryName("wooden_trident");
    	public static Item silverTrident = new ItemWeapon(300, 6, -2.5D, 7, "silverTrident").setRegistryName("silver_trident");
    	public static Item goldTrident = new ItemWeapon(450, 7, -2.5D, 10, "goldTrident").setRegistryName("gold_trident");
    	
    	//2x3dentKind
    	public static Item poseidonsEntente = new ItemWeapon(650, 12, -2.6D, 10, "poseidonsEntente").setRegistryName("poseidons_entente");
    	public static Item imperialFork = new ItemWeapon(1200, 22, -2.6D, 12, "emperialFork").setRegistryName("emperial_fork");
    	
    	//makeupKind
    	public static Item lipstickChainsaw = new ItemDualWeapon(250, 5.0D, 1.0D, -1.5D, -2.5D, 10, "lipstickChainsaw").setTool("axe", 3, 3.0F).setRegistryName("lipstick_chainsaw");
    	public static Item ragripper = new ItemDualWeapon(800, 16.0D, 1.0D, -1.5D, -2.5D, 25, "demonbaneRagripper").setTool("axe", 5, 6.0F).setRegistryName("demonbane_ragripper");
    	
    	//clubKind
    	public static Item horseHitcher = new ItemDualWeapon(500, 6.0D, 0.5D, -2.4D, -1.0D, 10, "horseHitcher").setRegistryName("horse_hitcher");
    	public static Item cuestick = new ItemDualWeapon(500, 8.0D, 0.5D, -2.6D, -1.0D, 10, "cuestick").setRegistryName("cuestick");
    	public static Item clubOfFelony = new ItemDualWeapon(500, 8.0D, 0.5D, -2.4D, -1.0D, 10, "clubOfFelony").setRegistryName("club_of_felony");
    	
    	public static Item branch = new ItemWeapon(65, 3.0D, -2.0D, 2, "branch").setRegistryName("branch");
    	public static Item broom = new ItemWeapon(125, 4.0D, -2.4D, 5, "broom").setRegistryName("broom");
    	
    	//spearkind
    	
    	//sporkKind
    	public static Item goldenSpork = new ItemWeapon(750, 8.0D, -2.2D, 20, "goldenSpork").setRegistryName("golden_spork");
    	
    	//lanceKind
    	public static Item joustingLance = new ItemWeapon(250, 5.0D, -2.8D, 6, "joustingLance").setRegistryName("jousting_lance");
    	public static Item fiduspawnLance = new ItemWeapon(100, 4.0D, -2.8D, 5, "fiduspawnLance").setRegistryName("fiduspawn_lance");
    	public static Item cigaretteHolderLance = new ItemWeapon(450, 6.0D, -2.8D, 8, "cigaretteLance").setRegistryName("cigarette_lance");
    	public static Item rocketPopLance = new ItemCandyWeapon(500, 6.0D, -2.8D, 10, "rocketPopLance").setRegistryName("rocketpop_lance");
    	
    	//caneKind
    	public static Item blindmansDirections = new ItemWeapon(600, 8.0D, -2.4D, 12, "blindmansDirections").setRegistryName("blindmans_directions");
    	public static Item blackStaff = new ItemDualWeapon(250, 4.0D, 0.0D, -2.6D, -1.0D, 4, "blackStaff").setRegistryName("black_staff");
    	public static Item goldStaff = new ItemDualWeapon(450, 9.0D, 0.0D, -2.6D, 1.0D, 10, "goldStaff").setRegistryName("gold_staff");
    	public static Item crowbar = new ItemWeapon(500, 8.0D, -2.6D, 20, "crowbar").setRegistryName("crowbar");
    	public static Item pogoCane = new ItemPogoWeapon(400, 7.0D, -2.0D, 8, "pogoCane", 0.7).setRegistryName("minestuck", "pogo_cane");
    	public static Item regicane = new ItemWeapon(812, 6, -2.4D, 10, "regicane").setRegistryName("regicane");
    	public static Item bladedCane = new ItemWeapon(350, 6.0D, -2.0D, 10, "bladedCane").setRegistryName("bladed_cane");
    	public static Item blazingGlory = new ItemWeapon(950, 7.0D, -2.0D, 14, "blazingGlory").setRegistryName("blazing_glory");
    	public static Item radioactiveStaff = new ItemWeapon(650, 6.5D, -2.0D, 12, "radioactiveStaff").setRegistryName("radioactive_staff");
    	
    	//batKind
    	public static Item woodenBat = new ItemWeapon(300, 4.0D, -2.2D, 4, "woodenBat").setRegistryName("wooden_bat");
    	public static Item cricketBat = new ItemWeapon(400, 5.0D, -2.2D, 6, "cricketBat").setRegistryName("cricket_bat");
    	
    	//clawKind
    	public static Item nepetaClaws = new ItemDualWeapon(700, 7.0D, 1.0D, -1.5D,-1.0D, 10, "nepetaClaws").setRegistryName("nepeta_claws");
    	public static Item blueClaws = new ItemDualWeapon(1200, 14.0D, 1.0D, -1.5D, -1.0D, 12, "blueClaws").setRegistryName("blue_claws");
    	
    	//axeKind
    	public static Item aks = new ItemSord(59, 3, -3.0D, 5, "aks").setRegistryName("aks");
    	
    	//whipKind
    	public static Item leatherWhip = new ItemWeapon(250, 5.0D, -1.5D, 6, "leatherWhip").setRegistryName("leather_whip");
    	
    	//thrwstrKind
    	public static Item suitarangHeart = new ItemSuitarang("suitarangHeart").setRegistryName("suitarang_heart");
    	public static Item suitarangSpade = new ItemSuitarang("suitarangSpade").setRegistryName("suitarang_spade");
    	public static Item suitarangDiamond = new ItemSuitarang("suitarangDiamond").setRegistryName("suitarang_diamond");
    	public static Item suitarangClub = new ItemSuitarang("suitarangClub").setRegistryName("suitarang_club");
    
    	//scythekind
    	public static Item eightballScythe = new ItemWeapon(888, 8.0D, -2.2D, 8, "eightballScythe").setRegistryName("eightball_scythe");
    	
    	//bookKind
    	
    	//bombKind
    	public static Item barbasolBomb = new ItemBarbasolBomb("barbasolBomb").setRegistryName("barbasol_bomb");
    	
    	//keykind
    	public static Item houseKey = new ItemWeapon(250, 2.5D, -2.4D, 5, "houseKey").setRegistryName("house_key").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item keyblade = new ItemWeapon(450, 4.5D, -2.4D, 11, "keyblade").setRegistryName("keyblade").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item trueBlue = new ItemWeapon(550, 5.5D, -2.4D, 13, "trueBlue").setRegistryName("true_blue").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item yaldabaothsKeyton = new ItemWeapon(2400, 25.0D, -2.4D, 30, "yaldabaothsKeyton").setRegistryName("yaldabaoths_keyton").setCreativeTab(MinestuckItems.tabMinestuck);
    	
    	//Misc Weapons
    	public static Item jujuSucker = new ItemWeapon(413, 12.0D, -2.4D, 30, "jujuSucker").setRegistryName("juju_sucker");
    	public static Item mineNGrist = new ItemMineNGrist().setUnlocalizedName("mineAndGrist").setRegistryName("mine_and_grist").setCreativeTab(MinestuckItems.tabMinestuck);
    	
    	
    	//Food
    	public static Item appleJuice = new ItemArsenalBeverage("appleJuice").setRegistryName("apple_juice");
    	public static Item scottyDog = new ItemFood(2, 0.4F, false).setRegistryName("scotty_dog").setUnlocalizedName("scottyDog").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item licoriceGummyBear = new ItemFood(2, 0.4F, false).setRegistryName("licorice_gummy_bear").setUnlocalizedName("licoriceGummyBear").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item licoriceFish = new ItemFood(2, 0.4F, false).setRegistryName("licorice_fish").setUnlocalizedName("licoriceFish").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item cottonCandy = new ItemFood(4, 0.5F, false).setRegistryName("cotton_candy").setUnlocalizedName("cottonCandy").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item cuttlefish = new ItemFood(5, 0.5F, false).setRegistryName("cuttlefish").setUnlocalizedName("cuttlefish").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item soporSlime = new ItemSoporSlime();
    	public static Item sorrowGushers = new ItemSorrowGushers();
    	public static Item phlegmGushers = new ItemPhlegmGushers();
    	public static Item ectoCookie = new ItemEctoFood(4, 0.4F, false, "ectoCookie", 4).setRegistryName("ecto_cookie");
    	public static Item ectoLoaf = new ItemEctoFood(6, 0.5F, false, "ectoLoaf", 4).setRegistryName("ecto_loaf");
    	public static Item ectoSteak = new ItemEctoFood(8, 0.6F, false, "ectoSteak", 4).setRegistryName("ecto_steak");
    	public static Item faygoEcto = new ItemEctoDrink("faygoEcto", 8).setRegistryName("faygo_ecto");
    	
    	//Other
    	public static Item clothesIron = new Item().setRegistryName("clothes_iron").setUnlocalizedName("clothesIron").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item barbasol = new Item().setRegistryName("barbasol").setUnlocalizedName("barbasol").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item magicEightBall = new Item().setRegistryName("magic_eight_ball").setUnlocalizedName("magicEightBall").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item magicCueball = new Item().setRegistryName("magic_cueball").setUnlocalizedName("magicCueball").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item crystalBall = new Item().setRegistryName("crystal_ball").setUnlocalizedName("crystalBall").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item fridgeMagnet = new Item().setRegistryName("fridge_magnet").setUnlocalizedName("fridgeMagnet").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item hostPlush = new Item().setRegistryName("host_plush").setUnlocalizedName("hostPlush").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item wizardStatue = new Item().setRegistryName("wizard_statue").setUnlocalizedName("wizardStatue").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item wiseguyBook = new Item().setRegistryName("wiseguy").setUnlocalizedName("wiseguy").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item grimoire = new Item().setRegistryName("grimoire").setUnlocalizedName("grimoire").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item flarpManual = new Item().setRegistryName("flarp_manual").setUnlocalizedName("flarpManual").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item athManual = new Item().setRegistryName("ath_manual").setUnlocalizedName("athManual").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item trollRomance = new Item().setRegistryName("troll_romance").setUnlocalizedName("trollRomance").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item inkSquidProQuo = new Item().setRegistryName("ink_squid_pro_quo").setUnlocalizedName("inkSquidProQuo").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item blueEctoSlime = new Item().setRegistryName("blue_ecto_slime").setUnlocalizedName("blueEctoSlime").setCreativeTab(MinestuckItems.tabMinestuck);
    	
    	public static Item scalemate = new ItemScalemate();
    	
    	public static Item captcharoidCamera = new ItemCaptcharoidCamera();
    	public static Item sbahjifier = new ItemSBAHJifier();
    	
    	public static Item horn = new ItemHorn();
    	
    	//public static Item boondollar = new ItemBoondollar("boondollar", 1).setRegistryName("boondollar");
    	public static Item boonbuck = new ItemBoondollar("boonbuck", 1000000).setRegistryName("boonbuck");
    	public static Item booncase = new ItemBoondollar("booncase", 1000000000).setRegistryName("booncase");
    	
    	//Clothing
    	public static Item trollHeadband = new ItemArmor(armorTrollHeadband, 0, EntityEquipmentSlot.HEAD).setRegistryName("troll_horn_headband").setUnlocalizedName("trollHornHeadband").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item dirkShades = new ItemArmor(armorDirkGlasses, 0, EntityEquipmentSlot.HEAD).setRegistryName("dirk_glasses").setUnlocalizedName("dirkGlasses").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item daveGlasses = new ItemArmor(armorDaveGlasses, 0, EntityEquipmentSlot.HEAD).setRegistryName("aviators").setUnlocalizedName("aviators");
    	public static Item johnGlasses = new ItemArmor(armorJohnGlasses, 0, EntityEquipmentSlot.HEAD).setUnlocalizedName("glassesJohn").setRegistryName("glasses_john").setCreativeTab(MinestuckItems.tabMinestuck);
    	
    	
    	//Jade Glasses
    	public static Item jadeGlasses = new ItemArmor(armorJadeGlasses, 0, EntityEquipmentSlot.HEAD).setUnlocalizedName("glassesJade").setRegistryName("glasses_jade").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item soothSpecs = new ItemArmor(armorSoothSpecs, 0, EntityEquipmentSlot.HEAD).setUnlocalizedName("soothSpecs").setRegistryName("sooth_specs").setCreativeTab(MinestuckItems.tabMinestuck);
    
    	//Iron Lass
    	public static Item ironLassGlasses = new ItemArmor(armorIronLass, 0, EntityEquipmentSlot.HEAD).setUnlocalizedName("ironLassGlasses").setRegistryName("iron_lass_glasses").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item ironLassChestplate = new ItemArmor(armorIronLass, 0, EntityEquipmentSlot.CHEST).setUnlocalizedName("ironLassChestplate").setRegistryName("iron_lass_chestplate").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item ironLassSkirt = new ItemArmor(armorIronLass, 0, EntityEquipmentSlot.LEGS).setUnlocalizedName("ironLassSkirt").setRegistryName("iron_lass_skirt").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item ironLassShoes = new ItemRocketArmor("ironLassShoes", armorIronLass, 0, EntityEquipmentSlot.FEET).setUnlocalizedName("ironLassShoes").setRegistryName("iron_lass_shoes");
    	
    	
    	//Derse Pajamas
    	public static Item derseShirt = new ItemArmor(armorDerse, 0, EntityEquipmentSlot.CHEST).setRegistryName("derse_shirt").setUnlocalizedName("derseShirt").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item dersePants = new ItemArmor(armorDerse, 0, EntityEquipmentSlot.LEGS).setRegistryName("derse_pants").setUnlocalizedName("dersePants").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item derseShoes = new ItemArmor(armorDerse, 0, EntityEquipmentSlot.FEET).setRegistryName("derse_shoes").setUnlocalizedName("derseShoes").setCreativeTab(MinestuckItems.tabMinestuck);
    	
    	//Prospit Pajamas
    	public static Item prospitShirt = new ItemArmor(armorProspit, 0, EntityEquipmentSlot.CHEST).setRegistryName("prospit_shirt").setUnlocalizedName("prospitShirt").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item prospitPants = new ItemArmor(armorProspit, 0, EntityEquipmentSlot.LEGS).setRegistryName("prospit_pants").setUnlocalizedName("prospitPants").setCreativeTab(MinestuckItems.tabMinestuck);
    	public static Item prospitShoes = new ItemArmor(armorProspit, 0, EntityEquipmentSlot.FEET).setRegistryName("prospit_shoes").setUnlocalizedName("prospitShoes").setCreativeTab(MinestuckItems.tabMinestuck);
    	
    	//Rocket Items
    	public static Item rocketShoes = new ItemRocketArmor("rocketShoes", armorRocket, 0, EntityEquipmentSlot.FEET).setRegistryName("rocket_shoes");
    	
    	//Slime Armor
    	public static Item slimeShoes = new ItemSlimeShoes("slimeShoes", armorSlime, 0, EntityEquipmentSlot.FEET).setRegistryName("slime_shoes");
    	
    	//Suits
    	public static Item suitJacket = new ItemArmor(armorSuit, 0, EntityEquipmentSlot.CHEST).setUnlocalizedName("suitJacket").setRegistryName("suit_jacket");
    	public static Item suitPants = new ItemArmor(armorSuit, 0, EntityEquipmentSlot.LEGS).setUnlocalizedName("suitPants").setRegistryName("suit_pants");
    	public static Item suitShoes = new ItemArmor(armorSuit, 0, EntityEquipmentSlot.FEET).setUnlocalizedName("suitShoes").setRegistryName("suit_shoes");
    	
    	public static Item slimeSuitJacket = new ItemArmor(armorSlimeSuit, 0, EntityEquipmentSlot.CHEST).setUnlocalizedName("slimeSuitJacket").setRegistryName("slime_suit_jacket");
    	public static Item slimeSuitPants = new ItemArmor(armorSlimeSuit, 0, EntityEquipmentSlot.LEGS).setUnlocalizedName("slimeSuitPants").setRegistryName("slime_suit_pants");
    	public static Item slimeSuitShoes = new ItemArmor(armorSlimeSuit, 0, EntityEquipmentSlot.FEET).setUnlocalizedName("slimeSuitShoes").setRegistryName("slime_suit_shoes");
    	
    	public static Item wiseguySlimesuitJacket = new ItemArmor(armorWiseguy, 0, EntityEquipmentSlot.CHEST).setUnlocalizedName("wiseguySlimesuitJacket").setRegistryName("wiseguy_slimesuit_jacket");
    	public static Item wiseguySlimesuitPants = new ItemArmor(armorWiseguy, 0, EntityEquipmentSlot.LEGS).setUnlocalizedName("wiseguySlimesuitPants").setRegistryName("wiseguy_slimesuit_pants");
    	public static Item wiseguySlimesuitShoes = new ItemArmor(armorWiseguy, 0, EntityEquipmentSlot.FEET).setUnlocalizedName("wiseguySlimesuitShoes").setRegistryName("wiseguy_slimesuit_shoes");
    	
    	//Modus Cards
    	public static Item arrayModus = new Item().setRegistryName("array_modus").setUnlocalizedName("arrayModus").setCreativeTab(MinestuckItems.tabMinestuck).setMaxStackSize(1);
    	public static Item walletModus = new Item().setRegistryName("wallet_modus").setUnlocalizedName("walletModus").setCreativeTab(MinestuckItems.tabMinestuck).setMaxStackSize(1);
    	public static Item moneyModus = new Item().setRegistryName("money_modus").setUnlocalizedName("moneyModus").setCreativeTab(MinestuckItems.tabMinestuck).setMaxStackSize(1);
    	
    	
    	@SubscribeEvent
    	public static void registerItems(RegistryEvent.Register<Item> event)
    	{
    		IForgeRegistry<Item> registry = event.getRegistry();
    		
    		//ItemBlocks
    		registerItemBlock(registry, new ItemBlock(uniqueObject));
    		registerItemBlock(registry, new ItemBlock(frostLog));
    		registerItemBlock(registry, new ItemBlock(frostLeaves));
    		registerItemBlock(registry, new ItemBlock(sendificator));
    		registerItemBlock(registry, new ItemBlock(kringlefucker));
    		
    		//Override Minestuck Items
    		registry.register(caledfwlch);
    		registry.register(fearNoAnvil);
    		registry.register(mwrthwl);
    		
    		registry.register(houseKey);
    		registry.register(keyblade);
    		registry.register(trueBlue);
    		registry.register(yaldabaothsKeyton);
    		
    		//bladeKind
    		registry.register(paperSword);
    		registry.register(chainsawKatana);
    		registry.register(ancestralSword);
    		registry.register(cutlass);
    		
    		//1/2bladeKind
    		registry.register(brokenNinjaSword);
    		registry.register(brokenCaledfwlch);
    		registry.register(brokenRoyalDeringer);
    		registry.register(brokenScarletRibbitar);
    		
    		//sickleKind
    		registry.register(thornySubject);
    		registry.register(babysFirstThresher);
    		registry.register(derseReaper);
    		registry.register(prospitReaper);
    		registry.register(hemeoreaper);
    		registry.register(owTheEdge);
    		
    		//hammerKind
    		registry.register(wrinklefucker);
    		registry.register(barberBasher);
    		
    		//needleKind
    		registry.register(knittingNeedles);
    		registry.register(needleWands);
    		registry.register(thornsOfOglogoth);
    		registry.register(quillsOfEchidna);
    		
    		//tridentKind
    		registry.register(woodenTrident);
    		registry.register(silverTrident);
    		registry.register(goldTrident);
    		
    		//2x3dentKind
    		registry.register(poseidonsEntente);
    		registry.register(imperialFork);
    		
    		//makeupKind
    		registry.register(lipstickChainsaw);
    		registry.register(ragripper);
    		
    		//clubKind
    		registry.register(horseHitcher);
    		registry.register(cuestick);
    		registry.register(clubOfFelony);
    		registry.register(branch);
    		registry.register(broom);
    		
    		//axeKind
    		registry.register(aks);
    		
    		//sporkKind
    		registry.register(goldenSpork);
    		
    		//lanceKind
    		registry.register(joustingLance);
    		registry.register(fiduspawnLance);
    		registry.register(cigaretteHolderLance);
    		registry.register(rocketPopLance);
    		
    		//batKind
    		registry.register(woodenBat);
    		registry.register(cricketBat);
    		
    		//clawKind
    		registry.register(nepetaClaws);
    		registry.register(blueClaws);
    		
    		//whipKind
    		registry.register(leatherWhip);
    		
    		//caneKind
    		registry.register(blindmansDirections);
    		registry.register(pogoCane);
    		registry.register(bladedCane);
    		registry.register(regicane);
    		registry.register(blackStaff);
    		registry.register(goldStaff);
    		registry.register(crowbar);
    		registry.register(blazingGlory);
    		registry.register(radioactiveStaff);
    		
    		//scythekind
    		registry.register(eightballScythe);
    		
    		//guns
    		registry.register(huntingRifle);
    		registry.register(girlsBestFriend);
    		registry.register(greenSunStreetSweeper);
    		registry.register(beretta);
    		registry.register(goldBeretta);
    		registry.register(ahabsCrosshairs);
    		
    		//Mic weapon
    		registry.register(jujuSucker);
    		registry.register(mineNGrist);
    		
    		//bombKind
    		registry.register(barbasolBomb);
    		
    		//thrwstrKind
    		registry.register(suitarangClub);
    		registry.register(suitarangDiamond);
    		registry.register(suitarangHeart);
    		registry.register(suitarangSpade);
    		
    		//food
    		registry.register(appleJuice);
    		registry.register(scottyDog);
    		registry.register(licoriceFish);
    		registry.register(licoriceGummyBear);
    		registry.register(cottonCandy);
    		registry.register(cuttlefish);
    		registry.register(soporSlime);
    		registry.register(phlegmGushers);
    		registry.register(sorrowGushers);
    		registry.register(ectoCookie);
    		registry.register(ectoLoaf);
    		registry.register(ectoSteak);
    		registry.register(faygoEcto);
    		
    		//other
    		registry.register(captcharoidCamera);
    		registry.register(sbahjifier);
    		
    		registry.register(horn);
    		
    		registry.register(clothesIron);
    		registry.register(barbasol);
    		registry.register(magicEightBall);
    		registry.register(magicCueball);
    		registry.register(crystalBall);
    		registry.register(fridgeMagnet);
    		registry.register(hostPlush);
    		registry.register(wizardStatue);
    		registry.register(wiseguyBook);
    		registry.register(grimoire);
    		registry.register(flarpManual);
    		registry.register(athManual);
    		registry.register(trollRomance);
    		registry.register(inkSquidProQuo);
    		registry.register(blueEctoSlime);
    		
    		registry.register(scalemate);
    		
    		//registry.register(boondollar);
    		registry.register(boonbuck);
    		registry.register(booncase);
    		
    		//armor
    		registry.register(trollHeadband);
    		registry.register(dirkShades);
    		registry.register(daveGlasses);
    		registry.register(johnGlasses);
    		
    		registry.register(jadeGlasses);
    		registry.register(soothSpecs);
    		registry.register(ironLassGlasses);
    		registry.register(ironLassChestplate);
    		registry.register(ironLassSkirt);
    		registry.register(ironLassShoes);
    		
    		registry.register(derseShirt);
    		registry.register(dersePants);
    		registry.register(derseShoes);
    		
    		registry.register(prospitShirt);
    		registry.register(prospitPants);
    		registry.register(prospitShoes);
    		
    		registry.register(rocketShoes);
    		
    		registry.register(slimeShoes);
    		
    		registry.register(suitJacket);
    		registry.register(suitPants);
    		registry.register(suitShoes);
    		
    		registry.register(slimeSuitJacket);
    		registry.register(slimeSuitPants);
    		registry.register(slimeSuitShoes);
    		
    		registry.register(wiseguySlimesuitJacket);
    		registry.register(wiseguySlimesuitPants);
    		registry.register(wiseguySlimesuitShoes);
    	
    		registry.register(arrayModus);
    		registry.register(walletModus);
    		registry.register(moneyModus);
    		
    		
    	}
    	
    	private static Item registerItemBlock(IForgeRegistry<Item> registry, ItemBlock item)
    	{
    		registry.register(item.setRegistryName(item.getBlock().getRegistryName()));
    		return item;
    	}
    	
    }

     

     

  7. So I'm trying to have a boolean property that just does a simple "Glow at night" effect on this block. I've done something similar on a block in another mod, and as far as I can tell there's nothing different about them. Stopping at the super(material) in the debugger tells me the blockstate and default states are null, but why? Here's the relevant files. 

     

    Lunarworks.java:

    Spoiler
    
    package com.rose.lunarworks;
    
    import com.rose.lunarworks.blocks.ModBlocks;
    import com.rose.lunarworks.blocks.TileEntityLunarCondenser;
    import com.rose.lunarworks.fluids.ModFluids;
    import com.rose.lunarworks.items.ModItems;
    import com.rose.lunarworks.proxy.CommonProxy;
    
    import net.minecraft.item.ItemStack;
    import net.minecraftforge.common.MinecraftForge;
    import net.minecraftforge.fml.common.Mod;
    import net.minecraftforge.fml.common.Mod.EventHandler;
    import net.minecraftforge.fml.common.SidedProxy;
    import net.minecraftforge.fml.common.event.FMLInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
    import net.minecraftforge.fml.common.registry.GameRegistry;
    import net.minecraftforge.oredict.OreDictionary;
    
    @Mod(modid = Lunarworks.MODID, name = Lunarworks.MODNAME, version = Lunarworks.VERSION, useMetadata = true)
    public class Lunarworks {
    
    	public static final String MODID = "lunarworks";
        public static final String MODNAME = "Lunarworks";
        public static final String VERSION = "0.0.1";
        
        @SidedProxy(clientSide = "com.rose.lunarworks.proxy.ClientProxy", serverSide = "com.rose.lunarworks.proxy.CommonProxy")
        public static CommonProxy proxy;
    
        @Mod.Instance(MODID)
        public static Lunarworks instance;
        
        @EventHandler
        public void preInit(FMLPreInitializationEvent event) {
            proxy.preInit(event); 
        	MinecraftForge.EVENT_BUS.register(ModBlocks.class);
        	MinecraftForge.EVENT_BUS.register(ModItems.class);
        	GameRegistry.registerWorldGenerator(new WorldGenOres(), 3);
    		GameRegistry.registerTileEntity(TileEntityLunarCondenser.class, Lunarworks.MODID + "_lunar_condenser");
    		ModFluids.registerFluids();
        }
    
        @EventHandler
        public void init(FMLInitializationEvent e) {
            proxy.init(e);
        	SmeltingRecipes.init();
        	OreDictionary.registerOre("oreSilver", ModBlocks.silverOre);
        	OreDictionary.registerOre("ingotSilver", ModItems.silverIngot);
        	OreDictionary.registerOre("nuggetSilver", ModItems.silverNugget);
        }
    
        @EventHandler
        public void postInit(FMLPostInitializationEvent e) {
            proxy.postInit(e);
        }
    	
    }

     

     

    ModBlocks: 
     

    Spoiler
    
    package com.rose.lunarworks.blocks;
    
    import com.rose.lunarworks.Lunarworks;
    import com.rose.lunarworks.items.ModItems;
    
    import net.minecraft.block.Block;
    import net.minecraft.block.material.Material;
    import net.minecraftforge.event.RegistryEvent;
    import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
    import net.minecraftforge.fml.common.registry.GameRegistry;
    import net.minecraftforge.registries.IForgeRegistry;
    
    public class ModBlocks {
    
    	public static Block silverOre = new BlockSilverOre().setCreativeTab(ModItems.tabLunarworks);
    	public static Block silverBlock = new Block(Material.IRON).setHardness(4.0F).setResistance(6.0F).setUnlocalizedName("silverBlock").setRegistryName("silver_block").setCreativeTab(ModItems.tabLunarworks);
    	public static Block lunarCondenser = new BlockLunarCondenser().setCreativeTab(ModItems.tabLunarworks);
    	public static Block lunarTank = new BlockLunarTank().setHardness(2.0F).setResistance(2.0F);
    	
    	//Register Blocks
    	@SubscribeEvent
    	public static void registerBlocks(RegistryEvent.Register<Block> event)
    	{
    		IForgeRegistry<Block> registry = event.getRegistry();
    		
    		registry.register(silverOre);
    		registry.register(silverBlock);
    		registry.register(lunarCondenser);
    		registry.register(lunarTank);
    	}
    	
    }

     

     

    BlockSilverOre:
     

    Spoiler
    
    package com.rose.lunarworks.blocks;
    
    import java.util.Random;
    
    import net.minecraft.block.Block;
    import net.minecraft.block.material.Material;
    import net.minecraft.block.properties.IProperty;
    import net.minecraft.block.properties.PropertyBool;
    import net.minecraft.block.state.BlockStateContainer;
    import net.minecraft.block.state.IBlockState;
    import net.minecraft.util.math.BlockPos;
    import net.minecraft.world.World;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraftforge.fml.relauncher.SideOnly;
    
    public class BlockSilverOre extends Block {
    		
    		public static IProperty<Boolean> isGlowing = PropertyBool.create("isGlowing");
    
    		public BlockSilverOre() {
    			super(Material.ROCK);
    			this.setDefaultState(this.getDefaultState().withProperty(isGlowing, false));
    			this.setUnlocalizedName("silverOre");
    			this.setRegistryName("silver_ore");
    			setHardness(3f);
    			setResistance(5f);
    			this.setTickRandomly(true);
    			this.setHarvestLevel("pickaxe", 2);
    		}
    		
    		@Override
    	    protected BlockStateContainer createBlockState()
    	    {
    	        return new BlockStateContainer(this, new IProperty[] {isGlowing});
    	    }
    		
    		@Override
    		public BlockStateContainer getBlockState() {
    		// TODO Auto-generated method stub
    			return new BlockStateContainer(this, new IProperty[] {isGlowing});
    		}
    		
    		@Override
    		public void randomTick(World worldIn, BlockPos pos, IBlockState state, Random random) {
    		// TODO Auto-generated method stub
    			if(worldIn.isDaytime()) {
    				worldIn.setBlockState(pos, state.withProperty(isGlowing, false));
    			}
    			
    			else if(!worldIn.isDaytime()) {
    				worldIn.setBlockState(pos, state.withProperty(isGlowing, true));
    			}
    		}
    		
    		
    		@SideOnly(Side.CLIENT)
    		@Override
    		public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand) {
    		// TODO Auto-generated method stub
    			if(stateIn.getValue(isGlowing)) {
    				this.setLightLevel(8.0F);
    			}
    			
    			else if(!stateIn.getValue(isGlowing)) {
    				this.setLightLevel(0F);
    			}
    		}
    		
    		@Override
    		public IBlockState getStateFromMeta(int meta)
    	    {
    			if(meta < 0) {
    				meta = 0;
    			}
    			
    			if(meta > 1) {
    				meta = 1;
    			}
    			if(meta == 0) {
    				return this.blockState.getBaseState().withProperty(isGlowing, false);
    			}
    			else {
    				return this.blockState.getBaseState().withProperty(isGlowing, true);
    			}
    	    }
    		
    		@Override
    	    public int getMetaFromState(IBlockState state)
    	    {
    			if(!state.getValue(isGlowing))
    				return 0;
    			
    			else return 1;
    	    }
    }

     

    Crash Report:

    Spoiler

    ---- Minecraft Crash Report ----
    // You're mean.

    Time: 1/18/18 3:31 PM
    Description: Initializing game

    java.lang.ExceptionInInitializerError
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_11_ModBlocks_registerBlocks_Register.invoke(.dynamic)
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
        at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
        at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
        at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:736)
        at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:603)
        at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:270)
        at net.minecraft.client.Minecraft.init(Minecraft.java:513)
        at net.minecraft.client.Minecraft.run(Minecraft.java:421)
        at net.minecraft.client.main.Main.main(Main.java:118)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
        at GradleStart.main(GradleStart.java:26)
    Caused by: java.lang.NullPointerException
        at net.minecraft.block.state.BlockStateContainer.validateProperty(BlockStateContainer.java:103)
        at net.minecraft.block.state.BlockStateContainer.<init>(BlockStateContainer.java:77)
        at net.minecraft.block.state.BlockStateContainer.<init>(BlockStateContainer.java:62)
        at com.rose.lunarworks.blocks.BlockSilverOre.createBlockState(BlockSilverOre.java:34)
        at net.minecraft.block.Block.<init>(Block.java:290)
        at net.minecraft.block.Block.<init>(Block.java:299)
        at com.rose.lunarworks.blocks.BlockSilverOre.<init>(BlockSilverOre.java:21)
        at com.rose.lunarworks.blocks.ModBlocks.<clinit>(ModBlocks.java:15)
        ... 22 more


    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------

    -- Head --
    Thread: Client thread
    Stacktrace:
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_11_ModBlocks_registerBlocks_Register.invoke(.dynamic)
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
        at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
        at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
        at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:736)
        at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:603)
        at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:270)
        at net.minecraft.client.Minecraft.init(Minecraft.java:513)

    -- Initialization --
    Details:
    Stacktrace:
        at net.minecraft.client.Minecraft.run(Minecraft.java:421)
        at net.minecraft.client.main.Main.main(Main.java:118)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
        at GradleStart.main(GradleStart.java:26)

    -- System Details --
    Details:
        Minecraft Version: 1.12.2
        Operating System: Windows 10 (amd64) version 10.0
        Java Version: 1.8.0_121, Oracle Corporation
        Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
        Memory: 665606408 bytes (634 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
        JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
        IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
        FML: MCP 9.42 Powered by Forge 14.23.1.2589 5 mods loaded, 5 mods active
        States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

        | State | ID         | Version      | Source                           | Signature |
        |:----- |:---------- |:------------ |:-------------------------------- |:--------- |
        | UCH   | minecraft  | 1.12.2       | minecraft.jar                    | None      |
        | UCH   | mcp        | 9.42         | minecraft.jar                    | None      |
        | UCH   | FML        | 8.0.99.99    | forgeSrc-1.12.2-14.23.1.2589.jar | None      |
        | UCH   | forge      | 14.23.1.2589 | forgeSrc-1.12.2-14.23.1.2589.jar | None      |
        | UCH   | lunarworks | 0.0.1        | bin                              | None      |

        Loaded coremods (and transformers): 
        GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4358' Renderer: 'Intel(R) HD Graphics 4000'
        Launched Version: 1.12.2
        LWJGL: 2.9.4
        OpenGL: Intel(R) HD Graphics 4000 GL version 4.0.0 - Build 10.18.10.4358, Intel
        GL Caps: Using GL 1.3 multitexturing.
    Using GL 1.3 texture combiners.
    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
    Shaders are available because OpenGL 2.1 is supported.
    VBOs are available because OpenGL 1.5 is supported.

        Using VBOs: Yes
        Is Modded: Definitely; Client brand changed to 'fml,forge'
        Type: Client (map_client.txt)
        Resource Packs: 
        Current Language: English (US)
        Profiler Position: N/A (disabled)
        CPU: 4x Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz

     

     

    Just a little insight would be helpful because I'm missing something obvious.

  8. So I'm rendering a health bar that involves two parts, one overlapping the other. I was able to render the background bit perfectly fine, but when I try to render the actual bar that needs to move, it doesn't show up. I tried removing the background and still nothing shows up. Hoping someone can spot a simple mistake.

     

    https://github.com/linkisheroic/Minestuck/blob/1.12/src/com/mraof/minestuck/event/ClientEventHandler.java


    Rendering code

  9. I'm working on an addon mod for another mod, so I can't change the methods in the entity I'm trying to check collision for. When the player collides with the entity they "pick it up" like an item but it's just a game abstraction meant to change numbers associated with the player, so it isn't a living entity or item entity. I want to be able to play a custom sound when the player collects this entity, but I don't see a forge event for checking basic entity collisions? Can someone point towards something that might help me figure this out?

  10. 34 minutes ago, Draco18s said:
        at com.mraof.minestuck.item.block.ItemBlockLayered.<init>(ItemBlockLayered.java:24)

        at com.mraof.minestuck.item.MinestuckItems.registerItems(MinestuckItems.java:204)

    This isn't in the code you supplied. Your code is in com.natura.minestuckarsenal.item

    Yes. As I said, that's the main mod I'm using as an API. It seems like an obfuscation error when the game loads, but I can't figure out why.

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.