Added older registries back in

This commit is contained in:
Sebastian Hartte
2020-06-04 23:25:11 +02:00
parent 70444999b9
commit 51e82587c7
38 changed files with 453 additions and 434 deletions
@@ -32,9 +32,9 @@ import net.minecraft.world.World;
public abstract class AEBaseEntityItem extends ItemEntity
{
public AEBaseEntityItem( final World world )
public AEBaseEntityItem( EntityType<? extends AEBaseEntityItem> entityType, final World world )
{
super( EntityType.ITEM, world );
super( entityType, world );
}
public AEBaseEntityItem( final World world, final double x, final double y, final double z, final ItemStack stack )
@@ -24,6 +24,7 @@ import java.util.List;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
@@ -47,7 +48,11 @@ public final class EntityChargedQuartz extends AEBaseEntityItem
private int delay = 0;
private int transformTime = 0;
public EntityChargedQuartz( final World w, final double x, final double y, final double z, final ItemStack is )
public EntityChargedQuartz(EntityType<? extends EntityChargedQuartz> entityType, World world) {
super(entityType, world);
}
public EntityChargedQuartz(final World w, final double x, final double y, final double z, final ItemStack is )
{
super( w, x, y, z, is );
}
@@ -21,6 +21,7 @@ package appeng.entity;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -43,7 +44,11 @@ public final class EntityGrowingCrystal extends ItemEntity
private int progress_1000 = 0;
public EntityGrowingCrystal( final World w, final double x, final double y, final double z, final ItemStack is )
public EntityGrowingCrystal(EntityType<? extends EntityGrowingCrystal> type, World world) {
super(type, world);
}
public EntityGrowingCrystal(final World w, final double x, final double y, final double z, final ItemStack is )
{
super( w, x, y, z, is );
this.setNoDespawn();
@@ -1,57 +0,0 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.entity;
import net.minecraft.entity.Entity;
public final class EntityIds
{
private static final int TINY_TNT = 10;
private static final int SINGULARITY = 11;
private static final int CHARGED_QUARTZ = 12;
private static final int GROWING_CRYSTAL = 13;
private EntityIds()
{
}
public static int get( final Class<? extends Entity> droppedEntity )
{
if( droppedEntity == EntityTinyTNTPrimed.class )
{
return TINY_TNT;
}
if( droppedEntity == EntitySingularity.class )
{
return SINGULARITY;
}
if( droppedEntity == EntityChargedQuartz.class )
{
return CHARGED_QUARTZ;
}
if( droppedEntity == EntityGrowingCrystal.class )
{
return GROWING_CRYSTAL;
}
throw new IllegalStateException( "Missing entity id: " + droppedEntity.getName() );
}
}
@@ -23,6 +23,7 @@ import java.util.Date;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
@@ -43,10 +44,9 @@ public final class EntitySingularity extends AEBaseEntityItem
private static int randTickSeed = 0;
@Reflected
public EntitySingularity( final World w )
public EntitySingularity(EntityType<? extends EntitySingularity> entityType, final World w )
{
super( w );
super( entityType, w );
}
public EntitySingularity( final World w, final double x, final double y, final double z, final ItemStack is )